From d263d716aa03ab0cc260bca3944cd78fb6f93ab1 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 12:19:11 +0800 Subject: [PATCH 1/6] generated from swagger:b770b86265d5dc3a26b16c5d30a736e6bbba04de --- .../CHANGELOG.md | 4 + .../MANIFEST.in | 9 +- .../azure-mgmt-managednetworkfabric/README.md | 9 +- .../_meta.json | 11 - .../_metadata.json | 11 + .../apiview-properties.json | 600 + .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../mgmt/managednetworkfabric/__init__.py | 12 +- .../managednetworkfabric/_configuration.py | 23 +- .../_managed_network_fabric_mgmt_client.py | 60 +- .../azure/mgmt/managednetworkfabric/_patch.py | 1 + .../managednetworkfabric/_utils/__init__.py | 6 + .../serialization.py} | 695 +- .../mgmt/managednetworkfabric/_vendor.py | 30 - .../mgmt/managednetworkfabric/_version.py | 3 +- .../mgmt/managednetworkfabric/aio/__init__.py | 12 +- .../aio/_configuration.py | 23 +- .../_managed_network_fabric_mgmt_client.py | 64 +- .../mgmt/managednetworkfabric/aio/_patch.py | 1 + .../aio/operations/__init__.py | 58 +- .../_access_control_lists_operations.py | 564 +- .../_external_networks_operations.py | 513 +- .../_internal_networks_operations.py | 602 +- .../_internet_gateway_rules_operations.py | 359 +- .../_internet_gateways_operations.py | 358 +- .../operations/_ip_communities_operations.py | 376 +- .../_ip_extended_communities_operations.py | 359 +- .../aio/operations/_ip_prefixes_operations.py | 368 +- .../_l2_isolation_domains_operations.py | 565 +- .../_l3_isolation_domains_operations.py | 565 +- .../operations/_neighbor_groups_operations.py | 369 +- .../_network_device_skus_operations.py | 83 +- .../operations/_network_devices_operations.py | 706 +- .../_network_fabric_controllers_operations.py | 360 +- .../_network_fabric_skus_operations.py | 83 +- .../operations/_network_fabrics_operations.py | 1050 +- .../_network_interfaces_operations.py | 416 +- .../_network_packet_brokers_operations.py | 360 +- .../operations/_network_racks_operations.py | 377 +- .../_network_tap_rules_operations.py | 564 +- .../operations/_network_taps_operations.py | 517 +- ...ork_to_network_interconnects_operations.py | 516 +- .../aio/operations/_operations.py | 55 +- .../aio/operations/_patch.py | 1 + .../operations/_route_policies_operations.py | 583 +- .../managednetworkfabric/models/__init__.py | 545 +- ...anaged_network_fabric_mgmt_client_enums.py | 27 +- .../models/_models_py3.py | 1603 +- .../managednetworkfabric/models/_patch.py | 1 + .../operations/__init__.py | 58 +- .../_access_control_lists_operations.py | 605 +- .../_external_networks_operations.py | 550 +- .../_internal_networks_operations.py | 645 +- .../_internet_gateway_rules_operations.py | 387 +- .../_internet_gateways_operations.py | 386 +- .../operations/_ip_communities_operations.py | 404 +- .../_ip_extended_communities_operations.py | 387 +- .../operations/_ip_prefixes_operations.py | 394 +- .../_l2_isolation_domains_operations.py | 606 +- .../_l3_isolation_domains_operations.py | 606 +- .../operations/_neighbor_groups_operations.py | 395 +- .../_network_device_skus_operations.py | 95 +- .../operations/_network_devices_operations.py | 749 +- .../_network_fabric_controllers_operations.py | 388 +- .../_network_fabric_skus_operations.py | 95 +- .../operations/_network_fabrics_operations.py | 1117 +- .../_network_interfaces_operations.py | 445 +- .../_network_packet_brokers_operations.py | 388 +- .../operations/_network_racks_operations.py | 405 +- .../_network_tap_rules_operations.py | 607 +- .../operations/_network_taps_operations.py | 554 +- ...ork_to_network_interconnects_operations.py | 551 +- .../operations/_operations.py | 58 +- .../managednetworkfabric/operations/_patch.py | 1 + .../operations/_route_policies_operations.py | 624 +- .../code_report_swagger.json | 51216 ++++++++++++++++ ...ss_control_lists_create_maximum_set_gen.py | 3 + ...ss_control_lists_delete_maximum_set_gen.py | 2 + ...ccess_control_lists_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ts_list_by_subscription_maximum_set_gen.py | 2 + ...ss_control_lists_resync_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...ss_control_lists_update_maximum_set_gen.py | 3 + ..._validate_configuration_maximum_set_gen.py | 2 + ...xternal_networks_create_maximum_set_gen.py | 3 + ...xternal_networks_delete_maximum_set_gen.py | 2 + .../external_networks_get_maximum_set_gen.py | 2 + ..._by_l3_isolation_domain_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...xternal_networks_update_maximum_set_gen.py | 2 + ...fd_administrative_state_maximum_set_gen.py | 2 + ...nternal_networks_create_maximum_set_gen.py | 2 + ...nternal_networks_delete_maximum_set_gen.py | 2 + .../internal_networks_get_maximum_set_gen.py | 2 + ..._by_l3_isolation_domain_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...gp_administrative_state_maximum_set_gen.py | 2 + ...nternal_networks_update_maximum_set_gen.py | 2 + ...fd_administrative_state_maximum_set_gen.py | 2 + ...et_gateway_rules_create_maximum_set_gen.py | 2 + ...et_gateway_rules_delete_maximum_set_gen.py | 2 + ...ernet_gateway_rules_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + ...et_gateway_rules_update_maximum_set_gen.py | 2 + ...nternet_gateways_create_maximum_set_gen.py | 2 + ...nternet_gateways_delete_maximum_set_gen.py | 2 + .../internet_gateways_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ys_list_by_subscription_maximum_set_gen.py | 2 + ...nternet_gateways_update_maximum_set_gen.py | 2 + .../ip_communities_create_maximum_set_gen.py | 2 + .../ip_communities_delete_maximum_set_gen.py | 2 + .../ip_communities_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + .../ip_communities_update_maximum_set_gen.py | 2 + ...nded_communities_create_maximum_set_gen.py | 2 + ...nded_communities_delete_maximum_set_gen.py | 2 + ...xtended_communities_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + ...nded_communities_update_maximum_set_gen.py | 2 + .../ip_prefixes_create_maximum_set_gen.py | 2 + .../ip_prefixes_delete_maximum_set_gen.py | 2 + .../ip_prefixes_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + .../ip_prefixes_update_maximum_set_gen.py | 2 + ...ns_commit_configuration_maximum_set_gen.py | 2 + ...solation_domains_create_maximum_set_gen.py | 2 + ...solation_domains_delete_maximum_set_gen.py | 2 + ...2_isolation_domains_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ns_list_by_subscription_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...solation_domains_update_maximum_set_gen.py | 2 + ..._validate_configuration_maximum_set_gen.py | 2 + ...ns_commit_configuration_maximum_set_gen.py | 2 + ...solation_domains_create_maximum_set_gen.py | 2 + ...solation_domains_delete_maximum_set_gen.py | 2 + ...3_isolation_domains_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ns_list_by_subscription_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...solation_domains_update_maximum_set_gen.py | 2 + ..._validate_configuration_maximum_set_gen.py | 2 + .../generated_samples/list_operations.py | 2 + .../neighbor_groups_create_maximum_set_gen.py | 2 + .../neighbor_groups_delete_maximum_set_gen.py | 2 + .../neighbor_groups_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ps_list_by_subscription_maximum_set_gen.py | 2 + .../neighbor_groups_update_maximum_set_gen.py | 2 + ...network_device_skus_get_maximum_set_gen.py | 2 + ...us_list_by_subscription_maximum_set_gen.py | 2 + .../network_devices_create_maximum_set_gen.py | 2 + .../network_devices_delete_maximum_set_gen.py | 2 + .../network_devices_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + .../network_devices_reboot_maximum_set_gen.py | 2 + ...s_refresh_configuration_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + .../network_devices_update_maximum_set_gen.py | 2 + ...network_devices_upgrade_maximum_set_gen.py | 2 + ...bric_controllers_create_maximum_set_gen.py | 2 + ...bric_controllers_delete_maximum_set_gen.py | 2 + ..._fabric_controllers_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...rs_list_by_subscription_maximum_set_gen.py | 2 + ...bric_controllers_update_maximum_set_gen.py | 2 + ...network_fabric_skus_get_maximum_set_gen.py | 2 + ...us_list_by_subscription_maximum_set_gen.py | 2 + ...cs_commit_configuration_maximum_set_gen.py | 2 + .../network_fabrics_create_maximum_set_gen.py | 3 + .../network_fabrics_delete_maximum_set_gen.py | 2 + ...ork_fabrics_deprovision_maximum_set_gen.py | 2 + .../network_fabrics_get_maximum_set_gen.py | 2 + ...rk_fabrics_get_topology_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...cs_list_by_subscription_maximum_set_gen.py | 2 + ...twork_fabrics_provision_maximum_set_gen.py | 2 + ...s_refresh_configuration_maximum_set_gen.py | 2 + ...ement_bfd_configuration_maximum_set_gen.py | 2 + .../network_fabrics_update_maximum_set_gen.py | 2 + ...ement_bfd_configuration_maximum_set_gen.py | 2 + ...network_fabrics_upgrade_maximum_set_gen.py | 4 +- ..._validate_configuration_maximum_set_gen.py | 2 + ...twork_interfaces_create_maximum_set_gen.py | 2 + ...twork_interfaces_delete_maximum_set_gen.py | 2 + .../network_interfaces_get_maximum_set_gen.py | 2 + ..._list_by_network_device_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...twork_interfaces_update_maximum_set_gen.py | 2 + ...k_packet_brokers_create_maximum_set_gen.py | 2 + ...k_packet_brokers_delete_maximum_set_gen.py | 2 + ...work_packet_brokers_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...rs_list_by_subscription_maximum_set_gen.py | 2 + ...k_packet_brokers_update_maximum_set_gen.py | 2 + .../network_racks_create_maximum_set_gen.py | 2 + .../network_racks_delete_maximum_set_gen.py | 2 + .../network_racks_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ks_list_by_subscription_maximum_set_gen.py | 2 + .../network_racks_update_maximum_set_gen.py | 2 + ...etwork_tap_rules_create_maximum_set_gen.py | 2 + ...etwork_tap_rules_delete_maximum_set_gen.py | 2 + .../network_tap_rules_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + ...etwork_tap_rules_resync_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...etwork_tap_rules_update_maximum_set_gen.py | 2 + ..._validate_configuration_maximum_set_gen.py | 2 + .../network_taps_create_maximum_set_gen.py | 2 + .../network_taps_delete_maximum_set_gen.py | 2 + .../network_taps_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...ps_list_by_subscription_maximum_set_gen.py | 2 + .../network_taps_resync_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + .../network_taps_update_maximum_set_gen.py | 2 + ...rk_interconnects_create_maximum_set_gen.py | 2 + ...rk_interconnects_delete_maximum_set_gen.py | 2 + ...twork_interconnects_get_maximum_set_gen.py | 2 + ..._list_by_network_fabric_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + ...rk_interconnects_update_maximum_set_gen.py | 2 + ...fd_administrative_state_maximum_set_gen.py | 2 + ...es_commit_configuration_maximum_set_gen.py | 2 + .../route_policies_create_maximum_set_gen.py | 3 + .../route_policies_delete_maximum_set_gen.py | 2 + .../route_policies_get_maximum_set_gen.py | 2 + ..._list_by_resource_group_maximum_set_gen.py | 2 + ...es_list_by_subscription_maximum_set_gen.py | 2 + ...te_administrative_state_maximum_set_gen.py | 2 + .../route_policies_update_maximum_set_gen.py | 5 +- ..._validate_configuration_maximum_set_gen.py | 2 + .../generated_tests/conftest.py | 43 + ...ic_mgmt_access_control_lists_operations.py | 241 + ...t_access_control_lists_operations_async.py | 254 + ...abric_mgmt_external_networks_operations.py | 197 + ...mgmt_external_networks_operations_async.py | 208 + ...abric_mgmt_internal_networks_operations.py | 220 + ...mgmt_internal_networks_operations_async.py | 233 + ..._mgmt_internet_gateway_rules_operations.py | 108 + ...internet_gateway_rules_operations_async.py | 115 + ...abric_mgmt_internet_gateways_operations.py | 110 + ...mgmt_internet_gateways_operations_async.py | 117 + ...k_fabric_mgmt_ip_communities_operations.py | 116 + ...ic_mgmt_ip_communities_operations_async.py | 133 + ...mgmt_ip_extended_communities_operations.py | 113 + ...p_extended_communities_operations_async.py | 120 + ...work_fabric_mgmt_ip_prefixes_operations.py | 129 + ...abric_mgmt_ip_prefixes_operations_async.py | 136 + ...ic_mgmt_l2_isolation_domains_operations.py | 148 + ...t_l2_isolation_domains_operations_async.py | 161 + ...ic_mgmt_l3_isolation_domains_operations.py | 163 + ...t_l3_isolation_domains_operations_async.py | 182 + ..._fabric_mgmt_neighbor_groups_operations.py | 113 + ...c_mgmt_neighbor_groups_operations_async.py | 120 + ...ric_mgmt_network_device_skus_operations.py | 40 + ...mt_network_device_skus_operations_async.py | 41 + ..._fabric_mgmt_network_devices_operations.py | 167 + ...c_mgmt_network_devices_operations_async.py | 182 + ...t_network_fabric_controllers_operations.py | 130 + ...ork_fabric_controllers_operations_async.py | 137 + ...ric_mgmt_network_fabric_skus_operations.py | 40 + ...mt_network_fabric_skus_operations_async.py | 41 + ..._fabric_mgmt_network_fabrics_operations.py | 377 + ...c_mgmt_network_fabrics_operations_async.py | 402 + ...bric_mgmt_network_interfaces_operations.py | 119 + ...gmt_network_interfaces_operations_async.py | 128 + ..._mgmt_network_packet_brokers_operations.py | 110 + ...network_packet_brokers_operations_async.py | 117 + ...rk_fabric_mgmt_network_racks_operations.py | 109 + ...ric_mgmt_network_racks_operations_async.py | 116 + ...abric_mgmt_network_tap_rules_operations.py | 247 + ...mgmt_network_tap_rules_operations_async.py | 260 + ...ork_fabric_mgmt_network_taps_operations.py | 158 + ...bric_mgmt_network_taps_operations_async.py | 169 + ...ork_to_network_interconnects_operations.py | 191 + ..._network_interconnects_operations_async.py | 202 + ..._managed_network_fabric_mgmt_operations.py | 29 + ...ed_network_fabric_mgmt_operations_async.py | 30 + ...k_fabric_mgmt_route_policies_operations.py | 203 + ...ic_mgmt_route_policies_operations_async.py | 216 + .../pyproject.toml | 82 + .../sdk_packaging.toml | 11 - .../azure-mgmt-managednetworkfabric/setup.py | 83 - 294 files changed, 70255 insertions(+), 14899 deletions(-) delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_meta.json create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/{_serialization.py => _utils/serialization.py} (78%) delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_vendor.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_swagger.json create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/sdk_packaging.toml delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md index 60e7ecde0525..f0a406cc1d24 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.1.0 (2026-06-08) + +skip changelog generation + ## 1.0.0 (2023-07-19) ### Features Added diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/MANIFEST.in b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/MANIFEST.in index 456e86373690..34e5e51320d0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/MANIFEST.in +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/MANIFEST.in @@ -1,8 +1,7 @@ -include _meta.json -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/managednetworkfabric/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/README.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/README.md index abcc24ac69be..b51f1ad897b8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/README.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Managednetworkfabric Management Client Library. -This package has been tested with Python 3.7+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.7+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Microsoft Entra](https://learn.microsoft.com/entra/fundamentals/what-is-entra) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -59,6 +59,3 @@ Code samples for this package can be found at: If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. - - - diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_meta.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_meta.json deleted file mode 100644 index 06ea333b3f3a..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "a89c3854f2d1cca8c996e00c97af3179ecb9dd72", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.9.2", - "use": [ - "@autorest/python@6.6.0", - "@autorest/modelerfour@4.24.3" - ], - "autorest_command": "autorest specification/managednetworkfabric/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", - "readme": "specification/managednetworkfabric/resource-manager/readme.md" -} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json new file mode 100644 index 000000000000..34e0f249063d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json @@ -0,0 +1,11 @@ +{ + "commit": "b770b86265d5dc3a26b16c5d30a736e6bbba04de", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest": "3.10.2", + "use": [ + "@autorest/python@6.50.0", + "@autorest/modelerfour@4.27.0" + ], + "autorest_command": "autorest specification/managednetworkfabric/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-managednetworkfabric\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/managednetworkfabric/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json new file mode 100644 index 000000000000..9396cd2d9cc3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json @@ -0,0 +1,600 @@ +{ + "CrossLanguagePackageId": null, + "CrossLanguageDefinitionId": { + "azure.mgmt.managednetworkfabric.models.Resource": null, + "azure.mgmt.managednetworkfabric.models.TrackedResource": null, + "azure.mgmt.managednetworkfabric.models.AccessControlList": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListAction": null, + "azure.mgmt.managednetworkfabric.models.CommonMatchConditions": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration": null, + "azure.mgmt.managednetworkfabric.models.TagsUpdate": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListPatch": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.AnnotationResource": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.PortCondition": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListProperties": null, + "azure.mgmt.managednetworkfabric.models.AccessControlListsListResult": null, + "azure.mgmt.managednetworkfabric.models.IpCommunitySetOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityDeleteOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityAddOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunitySetOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityDeleteOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityAddOperationProperties": null, + "azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties": null, + "azure.mgmt.managednetworkfabric.models.AggregateRoute": null, + "azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration": null, + "azure.mgmt.managednetworkfabric.models.BfdConfiguration": null, + "azure.mgmt.managednetworkfabric.models.BgpConfiguration": null, + "azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration": null, + "azure.mgmt.managednetworkfabric.models.ErrorResponse": null, + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate": null, + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate": null, + "azure.mgmt.managednetworkfabric.models.ConnectedSubnet": null, + "azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy": null, + "azure.mgmt.managednetworkfabric.models.ControllerServices": null, + "azure.mgmt.managednetworkfabric.models.DestinationProperties": null, + "azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties": null, + "azure.mgmt.managednetworkfabric.models.EnableDisableOnResources": null, + "azure.mgmt.managednetworkfabric.models.ErrorAdditionalInfo": null, + "azure.mgmt.managednetworkfabric.models.ErrorDetail": null, + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicy": null, + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation": null, + "azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation": null, + "azure.mgmt.managednetworkfabric.models.ExtendedLocation": null, + "azure.mgmt.managednetworkfabric.models.ExtensionEnumProperty": null, + "azure.mgmt.managednetworkfabric.models.ProxyResource": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetwork": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.L3OptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.Layer3IpPrefixProperties": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkProperties": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.ExternalNetworksList": null, + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicy": null, + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation": null, + "azure.mgmt.managednetworkfabric.models.InternalNetwork": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkPatch": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkProperties": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration": null, + "azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration": null, + "azure.mgmt.managednetworkfabric.models.InternalNetworksList": null, + "azure.mgmt.managednetworkfabric.models.InternetGateway": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayPatch": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayProperties": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayRule": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayRuleProperties": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewayRulesListResult": null, + "azure.mgmt.managednetworkfabric.models.InternetGatewaysListResult": null, + "azure.mgmt.managednetworkfabric.models.IpCommunitiesListResult": null, + "azure.mgmt.managednetworkfabric.models.IpCommunity": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityIdList": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityPatch": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityProperties": null, + "azure.mgmt.managednetworkfabric.models.IpCommunityRule": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunity": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityListResult": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityProperties": null, + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule": null, + "azure.mgmt.managednetworkfabric.models.IpGroupProperties": null, + "azure.mgmt.managednetworkfabric.models.IpMatchCondition": null, + "azure.mgmt.managednetworkfabric.models.IpPrefix": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixesListResult": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixPatch": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixProperties": null, + "azure.mgmt.managednetworkfabric.models.IpPrefixRule": null, + "azure.mgmt.managednetworkfabric.models.IsolationDomainProperties": null, + "azure.mgmt.managednetworkfabric.models.L2IsolationDomain": null, + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch": null, + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainProperties": null, + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainsListResult": null, + "azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomain": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainProperties": null, + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainsListResult": null, + "azure.mgmt.managednetworkfabric.models.L3OptionBProperties": null, + "azure.mgmt.managednetworkfabric.models.Layer2Configuration": null, + "azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration": null, + "azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties": null, + "azure.mgmt.managednetworkfabric.models.NeighborAddress": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroup": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupDestination": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupPatch": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupProperties": null, + "azure.mgmt.managednetworkfabric.models.NeighborGroupsListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkDevice": null, + "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters": null, + "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParametersProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkDeviceProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkDeviceSku": null, + "azure.mgmt.managednetworkfabric.models.NetworkDeviceSkusListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkDevicesListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabric": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricController": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllersListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.TerminalServerPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricSku": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricSkusListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricsListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkInterface": null, + "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatchProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkInterfaceProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkInterfacesList": null, + "azure.mgmt.managednetworkfabric.models.NetworkPacketBroker": null, + "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokersListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkRack": null, + "azure.mgmt.managednetworkfabric.models.NetworkRackProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkRacksListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkTap": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapPatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParameters": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRule": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleProperties": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapRulesListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkTapsListResult": null, + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect": null, + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch": null, + "azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration": null, + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration": null, + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectsList": null, + "azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration": null, + "azure.mgmt.managednetworkfabric.models.Operation": null, + "azure.mgmt.managednetworkfabric.models.OperationDisplay": null, + "azure.mgmt.managednetworkfabric.models.OperationListResult": null, + "azure.mgmt.managednetworkfabric.models.OptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.OptionBProperties": null, + "azure.mgmt.managednetworkfabric.models.PortGroupProperties": null, + "azure.mgmt.managednetworkfabric.models.RebootProperties": null, + "azure.mgmt.managednetworkfabric.models.RoutePoliciesListResult": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicy": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyPatch": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyProperties": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties": null, + "azure.mgmt.managednetworkfabric.models.RouteTargetInformation": null, + "azure.mgmt.managednetworkfabric.models.RuleProperties": null, + "azure.mgmt.managednetworkfabric.models.StatementActionProperties": null, + "azure.mgmt.managednetworkfabric.models.StatementConditionProperties": null, + "azure.mgmt.managednetworkfabric.models.StaticRouteProperties": null, + "azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties": null, + "azure.mgmt.managednetworkfabric.models.SupportedVersionProperties": null, + "azure.mgmt.managednetworkfabric.models.SystemData": null, + "azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration": null, + "azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState": null, + "azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState": null, + "azure.mgmt.managednetworkfabric.models.UpdateVersion": null, + "azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties": null, + "azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties": null, + "azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse": null, + "azure.mgmt.managednetworkfabric.models.VlanGroupProperties": null, + "azure.mgmt.managednetworkfabric.models.VlanMatchCondition": null, + "azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties": null, + "azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties": null, + "azure.mgmt.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties": null, + "azure.mgmt.managednetworkfabric.models.SourceDestinationType": null, + "azure.mgmt.managednetworkfabric.models.PrefixType": null, + "azure.mgmt.managednetworkfabric.models.PortType": null, + "azure.mgmt.managednetworkfabric.models.Layer4Protocol": null, + "azure.mgmt.managednetworkfabric.models.AclActionType": null, + "azure.mgmt.managednetworkfabric.models.IPAddressType": null, + "azure.mgmt.managednetworkfabric.models.CreatedByType": null, + "azure.mgmt.managednetworkfabric.models.ConfigurationType": null, + "azure.mgmt.managednetworkfabric.models.CommunityActionTypes": null, + "azure.mgmt.managednetworkfabric.models.ConfigurationState": null, + "azure.mgmt.managednetworkfabric.models.ProvisioningState": null, + "azure.mgmt.managednetworkfabric.models.AdministrativeState": null, + "azure.mgmt.managednetworkfabric.models.GatewayType": null, + "azure.mgmt.managednetworkfabric.models.Action": null, + "azure.mgmt.managednetworkfabric.models.WellKnownCommunities": null, + "azure.mgmt.managednetworkfabric.models.Condition": null, + "azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets": null, + "azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes": null, + "azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled": null, + "azure.mgmt.managednetworkfabric.models.Extension": null, + "azure.mgmt.managednetworkfabric.models.BfdAdministrativeState": null, + "azure.mgmt.managednetworkfabric.models.BooleanEnumProperty": null, + "azure.mgmt.managednetworkfabric.models.AllowASOverride": null, + "azure.mgmt.managednetworkfabric.models.PeeringOption": null, + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName": null, + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRole": null, + "azure.mgmt.managednetworkfabric.models.InterfaceType": null, + "azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled": null, + "azure.mgmt.managednetworkfabric.models.NfcSku": null, + "azure.mgmt.managednetworkfabric.models.FabricSkuType": null, + "azure.mgmt.managednetworkfabric.models.NniType": null, + "azure.mgmt.managednetworkfabric.models.IsManagementType": null, + "azure.mgmt.managednetworkfabric.models.NetworkRackType": null, + "azure.mgmt.managednetworkfabric.models.EncapsulationType": null, + "azure.mgmt.managednetworkfabric.models.TapRuleActionType": null, + "azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds": null, + "azure.mgmt.managednetworkfabric.models.DestinationType": null, + "azure.mgmt.managednetworkfabric.models.Encapsulation": null, + "azure.mgmt.managednetworkfabric.models.PollingType": null, + "azure.mgmt.managednetworkfabric.models.Origin": null, + "azure.mgmt.managednetworkfabric.models.ActionType": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType": null, + "azure.mgmt.managednetworkfabric.models.RoutePolicyActionType": null, + "azure.mgmt.managednetworkfabric.models.AddressFamilyType": null, + "azure.mgmt.managednetworkfabric.models.EnableDisableState": null, + "azure.mgmt.managednetworkfabric.models.RebootType": null, + "azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState": null, + "azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction": null, + "azure.mgmt.managednetworkfabric.models.ValidateAction": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.list_by_l3_isolation_domain": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.list_by_l3_isolation_domain": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_reboot": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_reboot": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_refresh_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_refresh_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_upgrade": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_upgrade": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.list_by_network_device": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.list_by_network_device": null, + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_provision": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_provision": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_deprovision": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_deprovision": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_upgrade": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_upgrade": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_refresh_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_refresh_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_get_topology": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_get_topology": null, + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_resync": null, + "azure.mgmt.managednetworkfabric.operations.Operations.list": null, + "azure.mgmt.managednetworkfabric.aio.operations.Operations.list": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_create": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.get": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.get": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_delete": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_resource_group": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_subscription": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update_administrative_state": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_validate_configuration": null, + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_commit_configuration": null, + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_commit_configuration": null + } +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py index 81e2832ac5dc..039152ec12da 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "ManagedNetworkFabricMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py index 0f2bab76752e..3cfd8a22bc9b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py @@ -6,20 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING -from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class ManagedNetworkFabricMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class ManagedNetworkFabricMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for ManagedNetworkFabricMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -29,13 +28,21 @@ class ManagedNetworkFabricMgmtClientConfiguration(Configuration): # pylint: dis :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - super(ManagedNetworkFabricMgmtClientConfiguration, self).__init__(**kwargs) + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: api_version: str = kwargs.pop("api_version", "2023-06-15") if credential is None: @@ -45,9 +52,11 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-managednetworkfabric/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _configure(self, **kwargs: Any) -> None: @@ -56,9 +65,9 @@ def _configure(self, **kwargs: Any) -> None: self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: self.authentication_policy = ARMChallengeAuthenticationPolicy( diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py index 132b908ce5b7..c0e231aa1757 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py @@ -7,14 +7,19 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast +from typing_extensions import Self +from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient +from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import ManagedNetworkFabricMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AccessControlListsOperations, ExternalNetworksOperations, @@ -43,11 +48,11 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials import TokenCredential -class ManagedNetworkFabricMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attributes """Self service experience for Azure Network Fabric API. :ivar access_control_lists: AccessControlListsOperations operations @@ -117,8 +122,11 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=client-accepts-api-vers :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str @@ -130,13 +138,43 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ManagedNetworkFabricMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + ARMAutoResourceProviderRegistrationPolicy(), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -197,7 +235,7 @@ def __init__( self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.route_policies = RoutePoliciesOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -217,12 +255,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: request_copy = deepcopy(request) request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: self._client.close() - def __enter__(self) -> "ManagedNetworkFabricMgmtClient": + def __enter__(self) -> Self: self._client.__enter__() return self diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_serialization.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py similarity index 78% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_serialization.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py index 842ae727fbbc..6da830e0cf4a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_serialization.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py @@ -1,30 +1,12 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# 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. # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -39,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -48,11 +29,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, - List, - Mapping, ) try: @@ -62,13 +39,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self -from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback -from azure.core.serialization import NULL as AzureCoreNull +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -91,6 +68,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +91,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -124,7 +103,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: pass return ET.fromstring(data_as_str) # nosec - except ET.ParseError: + except ET.ParseError as err: # It might be because the server has an issue, and returned JSON with # content-type XML.... # So let's try a JSON load, and if it's still broken @@ -143,7 +122,9 @@ def _json_attemp(data): # The function hack is because Py2.7 messes up with exception # context otherwise. _LOGGER.critical("Wasn't XML not JSON, failing") - raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) @classmethod @@ -153,6 +134,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -170,13 +156,6 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], return None -try: - basestring # type: ignore - unicode_str = unicode # type: ignore -except NameError: - basestring = str - unicode_str = str - _LOGGER = logging.getLogger(__name__) try: @@ -184,80 +163,31 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0.""" - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation.""" - return "Z" - - def dst(self, dt): - """No daylight saving for UTC.""" - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: - self.additional_properties: Dict[str, Any] = {} - for k in kwargs: + self.additional_properties: Optional[dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -305,13 +242,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -331,7 +278,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -340,7 +291,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to azure from this model. + """Return the JSON that would be sent to server from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -351,12 +302,14 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -385,12 +338,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -400,30 +356,31 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -431,9 +388,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -445,7 +404,7 @@ def from_dict( if key_extractors is None else key_extractors ) - return deserializer(cls.__name__, data, content_type=content_type) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def _flatten_subtype(cls, key, objects): @@ -453,21 +412,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -506,11 +469,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -545,7 +510,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -561,17 +526,20 @@ def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -597,17 +565,19 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -638,7 +608,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -649,7 +620,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): else: # That's a basic type # Integrate namespace if necessary local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = unicode_str(new_attr) + local_node.text = str(new_attr) serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore @@ -662,23 +633,24 @@ def _serialize(self, target_obj, data_type=None, **kwargs): _serialized.update(_new_attr) # type: ignore _new_attr = _new_attr[k] # type: ignore _serialized = _serialized[k] - except ValueError: - continue + except ValueError as err: + if isinstance(err, SerializationError): + raise except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise_with_traceback(SerializationError, msg, err) - else: - return serialized + raise SerializationError(msg) from err + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -707,20 +679,22 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: - raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + raise SerializationError("Unable to build a model: " + str(err)) from err return self._serialize(data, data_type, **kwargs) def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -729,30 +703,30 @@ def url(self, name, data, data_type, **kwargs): if kwargs.get("skip_quote") is True: output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator if data_type.startswith("["): internal_data_type = data_type[1:-1] - data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] - if not kwargs.get("skip_quote", False): - data = [quote(str(d), safe="") for d in data] - return str(self.serialize_iter(data, internal_data_type, **kwargs)) + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) # Not a list, regular serialization output = self.serialize_data(data, data_type, **kwargs) @@ -762,19 +736,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -783,37 +758,36 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") try: - if data is AzureCoreNull: + if data is CoreNull: return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -823,12 +797,11 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." - raise_with_traceback(SerializationError, msg.format(data, data_type), err) - else: - return self._serialize(data, **kwargs) + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -844,23 +817,33 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -874,8 +857,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -885,13 +867,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. + Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -903,9 +885,14 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): for d in data: try: serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized.append(None) + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + if div: serialized = ["" if s is None else str(s) for s in serialized] serialized = div.join(serialized) @@ -941,16 +928,17 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} for key, value in attr.items(): try: serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError: + except ValueError as err: + if isinstance(err, SerializationError): + raise serialized[self.serialize_unicode(key)] = None if "xml" in serialization_ctxt: @@ -965,7 +953,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -973,6 +961,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -983,7 +972,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) if obj_type is _long_type: return self.serialize_long(attr) - if obj_type is unicode_str: + if obj_type is str: return self.serialize_unicode(attr) if obj_type is datetime.datetime: return self.serialize_iso(attr) @@ -997,7 +986,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1028,56 +1017,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1085,11 +1079,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1099,30 +1094,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1135,12 +1132,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1160,19 +1158,20 @@ def serialize_iso(attr, **kwargs): return date + microseconds + "Z" except (ValueError, OverflowError) as err: msg = "Unable to serialize datetime object." - raise_with_traceback(SerializationError, msg, err) + raise SerializationError(msg) from err except AttributeError as err: msg = "ISO-8601 object must be valid Datetime object." - raise_with_traceback(TypeError, msg, err) + raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1180,17 +1179,17 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1199,14 +1198,15 @@ def rest_key_extractor(attr, attr_desc, data): if working_data is None: # If at any point while following flatten JSON path see None, it means # that all properties under are None as well - # https://github.com/Azure/msrest-for-python/issues/197 return None key = ".".join(dict_keys[1:]) return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1220,7 +1220,6 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): if working_data is None: # If at any point while following flatten JSON path see None, it means # that all properties under are None as well - # https://github.com/Azure/msrest-for-python/issues/197 return None key = ".".join(dict_keys[1:]) @@ -1228,17 +1227,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1275,7 +1286,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1327,22 +1338,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1350,7 +1360,7 @@ def xml_key_extractor(attr, attr_desc, data): return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1359,9 +1369,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1381,7 +1391,7 @@ def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1397,27 +1407,29 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1434,15 +1446,15 @@ def _deserialize(self, target_obj, data): response, class_name = self._classify_target(target_obj, data) - if isinstance(response, basestring): + if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) - if data is None: + if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1471,10 +1483,9 @@ def _deserialize(self, target_obj, data): d_attrs[attr] = value except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore - raise_with_traceback(DeserializationError, msg, err) - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1501,18 +1512,20 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None - if isinstance(target, basestring): + if isinstance(target, str): try: target = self.dependencies[target] except KeyError: return target, target try: - target = target._classify(data, self.dependencies) + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1527,10 +1540,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1548,10 +1563,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1568,31 +1585,42 @@ def _unpack_content(raw_data, content_type=None): if hasattr(raw_data, "_content_consumed"): return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore return raw_data def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1601,15 +1629,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1623,7 +1652,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1642,15 +1675,15 @@ def deserialize_data(self, data, data_type): except (ValueError, TypeError, AttributeError) as err: msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) - raise_with_traceback(DeserializationError, msg, err) - else: - return self._deserialize(obj_type, data) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1667,6 +1700,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1677,20 +1711,21 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None if isinstance(attr, ET.Element): # Do no recurse on XML, just return the tree as-is return attr - if isinstance(attr, basestring): + if isinstance(attr, str): return self.deserialize_basic(attr, "str") obj_type = type(attr) if obj_type in self.basic_types: @@ -1716,11 +1751,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1728,8 +1762,9 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1739,24 +1774,27 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, basestring): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): @@ -1764,6 +1802,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1777,8 +1816,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1790,6 +1828,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1798,12 +1837,11 @@ def deserialize_enum(data, enum_obj): data = data.value if isinstance(data, int): # Workaround. We might consider remove it in the future. - # https://github.com/Azure/azure-rest-api-specs/issues/141 try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1819,8 +1857,9 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1831,8 +1870,9 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1846,24 +1886,26 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal - :raises: DeserializationError if string format invalid. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text try: - return decimal.Decimal(attr) # type: ignore + return decimal.Decimal(str(attr)) # type: ignore except decimal.DecimalException as err: msg = "Invalid decimal {}".format(attr) - raise_with_traceback(DeserializationError, msg, err) + raise DeserializationError(msg) from err @staticmethod def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1874,8 +1916,9 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1883,32 +1926,33 @@ def deserialize_duration(attr): duration = isodate.parse_duration(attr) except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." - raise_with_traceback(DeserializationError, msg, err) - else: - return duration + raise DeserializationError(msg) from err + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore raise DeserializationError("Date must have only digits and -. Received: %s" % attr) # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) @staticmethod def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1921,31 +1965,32 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) except ValueError as err: msg = "Cannot deserialize to rfc datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1972,9 +2017,8 @@ def deserialize_iso(attr): raise OverflowError("Hit max or min date") except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj @staticmethod def deserialize_unix(attr): @@ -1982,15 +2026,16 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore try: + attr = int(attr) date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) except ValueError as err: msg = "Cannot deserialize to unix datetime object." - raise_with_traceback(DeserializationError, msg, err) - else: - return date_obj + raise DeserializationError(msg) from err + return date_obj diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_vendor.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_vendor.py deleted file mode 100644 index bd0df84f5319..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_vendor.py +++ /dev/null @@ -1,30 +0,0 @@ -# -------------------------------------------------------------------------- -# 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 typing import List, cast - -from azure.core.pipeline.transport import HttpRequest - - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - formatted_components = cast(List[str], template.split("/")) - components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] - template = "/".join(components) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py index c47f66669f1b..aed7748bad79 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py @@ -6,4 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" + +VERSION = "1.1.0" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py index 2405f998680b..075be0377845 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "ManagedNetworkFabricMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py index fc0c8409b6a9..9e8b36baf35c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py @@ -6,20 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING -from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class ManagedNetworkFabricMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class ManagedNetworkFabricMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for ManagedNetworkFabricMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -29,13 +28,21 @@ class ManagedNetworkFabricMgmtClientConfiguration(Configuration): # pylint: dis :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - super(ManagedNetworkFabricMgmtClientConfiguration, self).__init__(**kwargs) + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: api_version: str = kwargs.pop("api_version", "2023-06-15") if credential is None: @@ -45,9 +52,11 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-managednetworkfabric/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) self._configure(**kwargs) def _configure(self, **kwargs: Any) -> None: @@ -56,9 +65,9 @@ def _configure(self, **kwargs: Any) -> None: self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) self.authentication_policy = kwargs.get("authentication_policy") if self.credential and not self.authentication_policy: self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py index 5cee3cd0fbc7..6fc79ccf6d5a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py @@ -7,13 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast +from typing_extensions import Self +from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient +from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import ManagedNetworkFabricMgmtClientConfiguration from .operations import ( AccessControlListsOperations, @@ -43,11 +48,11 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential -class ManagedNetworkFabricMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attributes """Self service experience for Azure Network Fabric API. :ivar access_control_lists: AccessControlListsOperations operations @@ -120,8 +125,11 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=client-accepts-api-vers :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str @@ -133,13 +141,45 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ManagedNetworkFabricMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs + ) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + AsyncARMAutoResourceProviderRegistrationPolicy(), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs ) - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -200,7 +240,9 @@ def __init__( self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.route_policies = RoutePoliciesOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + def _send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest @@ -220,12 +262,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncH request_copy = deepcopy(request) request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "ManagedNetworkFabricMgmtClient": + async def __aenter__(self) -> Self: await self._client.__aenter__() return self diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py index 95b33173ed4b..4a911a89fb9a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py @@ -5,34 +5,40 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._access_control_lists_operations import AccessControlListsOperations -from ._internet_gateways_operations import InternetGatewaysOperations -from ._internet_gateway_rules_operations import InternetGatewayRulesOperations -from ._ip_communities_operations import IpCommunitiesOperations -from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations -from ._ip_prefixes_operations import IpPrefixesOperations -from ._l2_isolation_domains_operations import L2IsolationDomainsOperations -from ._l3_isolation_domains_operations import L3IsolationDomainsOperations -from ._internal_networks_operations import InternalNetworksOperations -from ._external_networks_operations import ExternalNetworksOperations -from ._neighbor_groups_operations import NeighborGroupsOperations -from ._network_device_skus_operations import NetworkDeviceSkusOperations -from ._network_devices_operations import NetworkDevicesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_fabric_controllers_operations import NetworkFabricControllersOperations -from ._network_fabric_skus_operations import NetworkFabricSkusOperations -from ._network_fabrics_operations import NetworkFabricsOperations -from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations -from ._network_packet_brokers_operations import NetworkPacketBrokersOperations -from ._network_racks_operations import NetworkRacksOperations -from ._network_tap_rules_operations import NetworkTapRulesOperations -from ._network_taps_operations import NetworkTapsOperations -from ._operations import Operations -from ._route_policies_operations import RoutePoliciesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._access_control_lists_operations import AccessControlListsOperations # type: ignore +from ._internet_gateways_operations import InternetGatewaysOperations # type: ignore +from ._internet_gateway_rules_operations import InternetGatewayRulesOperations # type: ignore +from ._ip_communities_operations import IpCommunitiesOperations # type: ignore +from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations # type: ignore +from ._ip_prefixes_operations import IpPrefixesOperations # type: ignore +from ._l2_isolation_domains_operations import L2IsolationDomainsOperations # type: ignore +from ._l3_isolation_domains_operations import L3IsolationDomainsOperations # type: ignore +from ._internal_networks_operations import InternalNetworksOperations # type: ignore +from ._external_networks_operations import ExternalNetworksOperations # type: ignore +from ._neighbor_groups_operations import NeighborGroupsOperations # type: ignore +from ._network_device_skus_operations import NetworkDeviceSkusOperations # type: ignore +from ._network_devices_operations import NetworkDevicesOperations # type: ignore +from ._network_interfaces_operations import NetworkInterfacesOperations # type: ignore +from ._network_fabric_controllers_operations import NetworkFabricControllersOperations # type: ignore +from ._network_fabric_skus_operations import NetworkFabricSkusOperations # type: ignore +from ._network_fabrics_operations import NetworkFabricsOperations # type: ignore +from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations # type: ignore +from ._network_packet_brokers_operations import NetworkPacketBrokersOperations # type: ignore +from ._network_racks_operations import NetworkRacksOperations # type: ignore +from ._network_tap_rules_operations import NetworkTapRulesOperations # type: ignore +from ._network_taps_operations import NetworkTapsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._route_policies_operations import RoutePoliciesOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -61,5 +67,5 @@ "Operations", "RoutePoliciesOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py index 95d46a938dfa..d95787cfb41f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._access_control_lists_operations import ( build_create_request, build_delete_request, @@ -42,9 +45,11 @@ build_update_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class AccessControlListsOperations: @@ -61,19 +66,21 @@ class AccessControlListsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlList, IO], + body: Union[_models.AccessControlList, IO[bytes]], **kwargs: Any - ) -> _models.AccessControlList: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -96,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "AccessControlList") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -104,45 +111,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AccessControlList", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } - @overload async def begin_create( self, @@ -167,14 +173,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -187,7 +185,7 @@ async def begin_create( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -202,18 +200,10 @@ async def begin_create( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -226,7 +216,7 @@ async def begin_create( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlList, IO], + body: Union[_models.AccessControlList, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.AccessControlList]: """Creates Access Control List. @@ -238,19 +228,8 @@ async def begin_create( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :param body: Request payload. Is either a AccessControlList type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a AccessControlList type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO[bytes] :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -278,12 +257,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -296,17 +276,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.AccessControlList].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return AsyncLROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -321,12 +299,11 @@ async def get( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AccessControlList or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -340,49 +317,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO], + body: Union[_models.AccessControlListPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.AccessControlList]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -395,7 +369,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.AccessControlList]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -405,7 +379,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "AccessControlListPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -413,41 +387,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AccessControlList", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -473,14 +447,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -493,7 +459,7 @@ async def begin_update( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -508,18 +474,10 @@ async def begin_update( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Access Control List properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -532,7 +490,7 @@ async def begin_update( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO], + body: Union[_models.AccessControlListPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.AccessControlList]: """Updates the Access Control List. @@ -545,19 +503,8 @@ async def begin_update( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Access Control List properties to update. Is either a AccessControlListPatch type - or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -585,12 +532,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -602,22 +550,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.AccessControlList].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return AsyncLROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -629,42 +575,48 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -679,14 +631,6 @@ async def begin_delete( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -700,7 +644,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, api_version=api_version, @@ -709,11 +653,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -725,22 +670,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AccessControlList"]: + ) -> AsyncItemPaged["_models.AccessControlList"]: """List AccessControlLists by resource group. Implements AccessControlLists list by resource group GET method. @@ -748,7 +689,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AccessControlList or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] @@ -760,7 +700,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -771,16 +711,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -792,13 +730,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) @@ -808,34 +745,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AccessControlList"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.AccessControlList"]: """List AccessControlLists by subscription. Implements AccessControlLists list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AccessControlList or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] @@ -847,7 +782,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AccessCo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -858,15 +793,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AccessCo def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -878,13 +811,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) @@ -894,35 +826,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - } - async def _update_administrative_state_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,7 +866,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -945,7 +876,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -953,43 +884,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -1014,14 +944,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1034,7 +956,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1049,18 +971,10 @@ async def begin_update_administrative_state( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1073,7 +987,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates administrative state of Access Control Lists. @@ -1085,20 +999,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1126,12 +1029,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1143,22 +1047,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _resync_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1170,50 +1072,49 @@ async def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync" - } - @distributed_trace_async async def begin_resync( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any @@ -1227,14 +1128,6 @@ async def begin_resync( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1259,12 +1152,13 @@ async def begin_resync( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1276,22 +1170,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,50 +1195,49 @@ async def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration" - } - @distributed_trace_async async def begin_validate_configuration( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any @@ -1360,14 +1251,6 @@ async def begin_validate_configuration( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1392,12 +1275,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1409,14 +1293,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py index 008b27054faf..a9046d7dba18 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._external_networks_operations import ( build_create_request, build_delete_request, @@ -40,9 +43,11 @@ build_update_request, build_update_static_route_bfd_administrative_state_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ExternalNetworksOperations: @@ -59,20 +64,22 @@ class ExternalNetworksOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetwork, IO], + body: Union[_models.ExternalNetwork, IO[bytes]], **kwargs: Any - ) -> _models.ExternalNetwork: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85,7 +92,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -95,7 +102,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "ExternalNetwork") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -104,40 +111,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } - @overload async def begin_create( self, @@ -166,14 +171,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -187,7 +184,7 @@ async def begin_create( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -205,18 +202,10 @@ async def begin_create( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -230,7 +219,7 @@ async def begin_create( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetwork, IO], + body: Union[_models.ExternalNetwork, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ExternalNetwork]: """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external @@ -245,19 +234,8 @@ async def begin_create( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a ExternalNetwork type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a ExternalNetwork type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO[bytes] :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -286,12 +264,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -304,17 +283,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return AsyncLROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -331,12 +308,11 @@ async def get( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExternalNetwork or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -350,51 +326,48 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO], + body: Union[_models.ExternalNetworkPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.ExternalNetwork]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -407,7 +380,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.ExternalNetwork]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -417,7 +390,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "ExternalNetworkPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -426,41 +399,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -489,14 +462,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -510,7 +475,7 @@ async def begin_update( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -527,18 +492,10 @@ async def begin_update( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -552,7 +509,7 @@ async def begin_update( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO], + body: Union[_models.ExternalNetworkPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ExternalNetwork]: """Updates a External Networks. @@ -567,19 +524,8 @@ async def begin_update( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: ExternalNetwork properties to update. Only annotations are supported. Is either a - ExternalNetworkPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + ExternalNetworkPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: @@ -608,12 +554,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -625,22 +572,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return AsyncLROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -652,39 +597,45 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -701,14 +652,6 @@ async def begin_delete( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -722,7 +665,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -732,11 +675,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -747,22 +691,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_l3_isolation_domain( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ExternalNetwork"]: + ) -> AsyncItemPaged["_models.ExternalNetwork"]: """Executes list operation to display External Networks within an isolation domain. Implements External Networks list by resource group GET method. @@ -772,7 +712,6 @@ def list_by_l3_isolation_domain( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -784,7 +723,7 @@ def list_by_l3_isolation_domain( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExternalNetworksList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -795,17 +734,15 @@ def list_by_l3_isolation_domain( def prepare_request(next_link=None): if not next_link: - request = build_list_by_l3_isolation_domain_request( + _request = build_list_by_l3_isolation_domain_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_l3_isolation_domain.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -817,13 +754,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("ExternalNetworksList", pipeline_response) @@ -833,36 +769,35 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_l3_isolation_domain.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks" - } - async def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -875,7 +810,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -885,7 +820,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -894,43 +829,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -958,14 +892,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -979,7 +905,7 @@ async def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -996,18 +922,10 @@ async def begin_update_administrative_state( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1021,7 +939,7 @@ async def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1035,20 +953,9 @@ async def begin_update_administrative_state( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1077,12 +984,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1094,27 +1002,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _update_static_route_bfd_administrative_state_initial( + async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1127,7 +1033,7 @@ async def _update_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1137,7 +1043,7 @@ async def _update_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_static_route_bfd_administrative_state_request( + _request = build_update_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -1146,45 +1052,44 @@ async def _update_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState" - } - @overload - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, @@ -1210,14 +1115,6 @@ async def begin_update_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1226,12 +1123,12 @@ async def begin_update_static_route_bfd_administrative_state( """ @overload - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1248,18 +1145,10 @@ async def begin_update_static_route_bfd_administrative_state( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1268,12 +1157,12 @@ async def begin_update_static_route_bfd_administrative_state( """ @distributed_trace_async - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes Static Route BFD state update operation to the underlying resources. @@ -1287,20 +1176,9 @@ async def begin_update_static_route_bfd_administrative_state( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1329,12 +1207,13 @@ async def begin_update_static_route_bfd_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1346,14 +1225,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py index 41301f0e7969..105c7d0498c8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._internal_networks_operations import ( build_create_request, build_delete_request, @@ -41,9 +44,11 @@ build_update_request, build_update_static_route_bfd_administrative_state_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class InternalNetworksOperations: @@ -60,20 +65,22 @@ class InternalNetworksOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetwork, IO], + body: Union[_models.InternalNetwork, IO[bytes]], **kwargs: Any - ) -> _models.InternalNetwork: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -96,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "InternalNetwork") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -105,40 +112,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("InternalNetwork", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } - @overload async def begin_create( self, @@ -167,14 +172,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -188,7 +185,7 @@ async def begin_create( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -206,18 +203,10 @@ async def begin_create( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -231,7 +220,7 @@ async def begin_create( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetwork, IO], + body: Union[_models.InternalNetwork, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternalNetwork]: """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and @@ -246,19 +235,8 @@ async def begin_create( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a InternalNetwork type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternalNetwork type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -287,12 +265,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -305,17 +284,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return AsyncLROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -332,12 +309,11 @@ async def get( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternalNetwork or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -351,51 +327,48 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO], + body: Union[_models.InternalNetworkPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternalNetwork]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -408,7 +381,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternalNetwork]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -418,7 +391,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "InternalNetworkPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -427,41 +400,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternalNetwork", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -490,14 +463,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -511,7 +476,7 @@ async def begin_update( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -528,18 +493,10 @@ async def begin_update( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -553,7 +510,7 @@ async def begin_update( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO], + body: Union[_models.InternalNetworkPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternalNetwork]: """API to update certain properties of the InternalNetworks resources. @@ -568,19 +525,8 @@ async def begin_update( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: InternalNetwork properties to update. Only annotations are supported. Is either a - InternalNetworkPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + InternalNetworkPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of cls(response) :rtype: @@ -609,12 +555,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -626,22 +573,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return AsyncLROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,39 +598,45 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -702,14 +653,6 @@ async def begin_delete( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -723,7 +666,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -733,11 +676,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -748,22 +692,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_l3_isolation_domain( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InternalNetwork"]: + ) -> AsyncItemPaged["_models.InternalNetwork"]: """Executes list operation to display list of all internal networks. Displays InternalNetworks list by resource group GET method. @@ -773,7 +713,6 @@ def list_by_l3_isolation_domain( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternalNetwork or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -785,7 +724,7 @@ def list_by_l3_isolation_domain( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternalNetworksList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -796,17 +735,15 @@ def list_by_l3_isolation_domain( def prepare_request(next_link=None): if not next_link: - request = build_list_by_l3_isolation_domain_request( + _request = build_list_by_l3_isolation_domain_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_l3_isolation_domain.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -818,13 +755,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("InternalNetworksList", pipeline_response) @@ -834,36 +770,35 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_l3_isolation_domain.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks" - } - async def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +811,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -886,7 +821,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -895,43 +830,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -959,14 +893,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -980,7 +906,7 @@ async def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -997,18 +923,10 @@ async def begin_update_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1022,7 +940,7 @@ async def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes the operation to the underlying resources. @@ -1036,20 +954,9 @@ async def begin_update_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1078,12 +985,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1095,27 +1003,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _update_bgp_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1128,7 +1034,7 @@ async def _update_bgp_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1138,7 +1044,7 @@ async def _update_bgp_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_bgp_administrative_state_request( + _request = build_update_bgp_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1147,43 +1053,42 @@ async def _update_bgp_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_bgp_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_bgp_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState" - } - @overload async def begin_update_bgp_administrative_state( self, @@ -1211,14 +1116,6 @@ async def begin_update_bgp_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1232,7 +1129,7 @@ async def begin_update_bgp_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1249,18 +1146,10 @@ async def begin_update_bgp_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1274,7 +1163,7 @@ async def begin_update_bgp_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -1288,20 +1177,9 @@ async def begin_update_bgp_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1330,12 +1208,13 @@ async def begin_update_bgp_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1347,27 +1226,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_bgp_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _update_static_route_bfd_administrative_state_initial( + async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1380,7 +1257,7 @@ async def _update_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1390,7 +1267,7 @@ async def _update_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_static_route_bfd_administrative_state_request( + _request = build_update_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1399,45 +1276,44 @@ async def _update_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState" - } - @overload - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, @@ -1463,14 +1339,6 @@ async def begin_update_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1479,12 +1347,12 @@ async def begin_update_static_route_bfd_administrative_state( """ @overload - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1501,18 +1369,10 @@ async def begin_update_static_route_bfd_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1521,12 +1381,12 @@ async def begin_update_static_route_bfd_administrative_state( """ @distributed_trace_async - async def begin_update_static_route_bfd_administrative_state( + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1540,20 +1400,9 @@ async def begin_update_static_route_bfd_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1582,12 +1431,13 @@ async def begin_update_static_route_bfd_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1599,14 +1449,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py index c7e056e1d5ce..6e9399f9e859 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._internet_gateway_rules_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class InternetGatewayRulesOperations: @@ -58,19 +62,21 @@ class InternetGatewayRulesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO], + body: Union[_models.InternetGatewayRule, IO[bytes]], **kwargs: Any - ) -> _models.InternetGatewayRule: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "InternetGatewayRule") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, @@ -101,45 +107,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } - @overload async def begin_create( self, @@ -164,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -184,7 +181,7 @@ async def begin_create( self, resource_group_name: str, internet_gateway_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -199,18 +196,10 @@ async def begin_create( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -223,7 +212,7 @@ async def begin_create( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO], + body: Union[_models.InternetGatewayRule, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternetGatewayRule]: """Creates an Internet Gateway rule. @@ -235,19 +224,9 @@ async def begin_create( :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :param body: Request payload. Is either a InternetGatewayRule type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternetGatewayRule type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -275,12 +254,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -293,17 +273,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return AsyncLROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -318,12 +296,11 @@ async def get( :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternetGatewayRule or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,49 +314,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO], + body: Union[_models.InternetGatewayRulePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternetGatewayRule]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -392,7 +366,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -402,7 +376,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "InternetGatewayRulePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, @@ -410,41 +384,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -470,14 +444,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -490,7 +456,7 @@ async def begin_update( self, resource_group_name: str, internet_gateway_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -505,18 +471,10 @@ async def begin_update( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Internet Gateway Rule properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -529,7 +487,7 @@ async def begin_update( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO], + body: Union[_models.InternetGatewayRulePatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternetGatewayRule]: """Updates an Internet Gateway Rule. @@ -542,19 +500,8 @@ async def begin_update( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Internet Gateway Rule properties to update. Is either a InternetGatewayRulePatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -582,12 +529,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -599,22 +547,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return AsyncLROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,30 +572,36 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -658,12 +610,12 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -678,14 +630,6 @@ async def begin_delete( :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -699,7 +643,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, api_version=api_version, @@ -708,11 +652,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -723,22 +668,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InternetGatewayRule"]: + ) -> AsyncItemPaged["_models.InternetGatewayRule"]: """List Internet Gateway Rules by resource group. Implements Internet Gateway Rules list by resource group GET method. @@ -746,7 +687,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] @@ -758,7 +698,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,16 +709,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -790,13 +728,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) @@ -806,34 +743,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.InternetGatewayRule"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGatewayRule"]: """List Internet Gateway Rules by subscription. List all Internet Gateway rules in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] @@ -845,7 +780,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Internet api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,15 +791,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Internet def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -876,13 +809,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) @@ -892,23 +824,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py index ac5ef843d697..fa5f5e245710 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._internet_gateways_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class InternetGatewaysOperations: @@ -58,19 +62,21 @@ class InternetGatewaysOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGateway, IO], + body: Union[_models.InternetGateway, IO[bytes]], **kwargs: Any - ) -> _models.InternetGateway: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "InternetGateway") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, @@ -101,45 +107,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGateway", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } - @overload async def begin_create( self, @@ -164,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -184,7 +181,7 @@ async def begin_create( self, resource_group_name: str, internet_gateway_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -199,18 +196,10 @@ async def begin_create( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -223,7 +212,7 @@ async def begin_create( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGateway, IO], + body: Union[_models.InternetGateway, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternetGateway]: """Create a Network Fabric Service Internet Gateway. @@ -235,19 +224,8 @@ async def begin_create( :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :param body: Request payload. Is either a InternetGateway type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternetGateway type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -275,12 +253,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -293,17 +272,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternetGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return AsyncLROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: @@ -316,12 +293,11 @@ async def get(self, resource_group_name: str, internet_gateway_name: str, **kwar :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternetGateway or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -335,49 +311,46 @@ async def get(self, resource_group_name: str, internet_gateway_name: str, **kwar api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO], + body: Union[_models.InternetGatewayPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternetGateway]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -390,7 +363,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternetGateway]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -400,7 +373,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "InternetGatewayPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, @@ -408,41 +381,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGateway", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -468,14 +441,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -488,7 +453,7 @@ async def begin_update( self, resource_group_name: str, internet_gateway_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -503,18 +468,10 @@ async def begin_update( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -527,7 +484,7 @@ async def begin_update( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO], + body: Union[_models.InternetGatewayPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.InternetGateway]: """Updates a Network Fabric Service Internet Gateway. @@ -540,19 +497,8 @@ async def begin_update( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - InternetGatewayPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + InternetGatewayPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of cls(response) :rtype: @@ -580,12 +526,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -597,22 +544,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.InternetGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return AsyncLROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -624,38 +569,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -670,14 +621,6 @@ async def begin_delete( :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -691,7 +634,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, api_version=api_version, @@ -700,11 +643,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -715,22 +659,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InternetGateway"]: + ) -> AsyncItemPaged["_models.InternetGateway"]: """List Internet Gateways by resource group. Displays Internet Gateways list by resource group GET method. @@ -738,7 +678,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGateway or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -750,7 +689,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -761,16 +700,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -782,13 +719,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) @@ -798,34 +734,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.InternetGateway"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGateway"]: """List Internet Gateways by subscription. Displays Internet Gateways list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGateway or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -837,7 +771,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Internet api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -848,15 +782,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Internet def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -868,13 +800,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) @@ -884,23 +815,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py index 12916eb4c55b..96e892b481c2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._ip_communities_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IpCommunitiesOperations: @@ -58,15 +62,21 @@ class IpCommunitiesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunity, IO], **kwargs: Any - ) -> _models.IpCommunity: - error_map = { + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -89,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "IpCommunity") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, @@ -97,45 +107,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpCommunity", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } - @overload async def begin_create( self, @@ -160,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -179,7 +180,7 @@ async def begin_create( self, resource_group_name: str, ip_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -194,18 +195,10 @@ async def begin_create( :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -214,7 +207,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunity, IO], **kwargs: Any + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.IpCommunity]: """Create an IP Community. @@ -225,19 +222,8 @@ async def begin_create( :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :param body: Request payload. Is either a IpCommunity type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpCommunity type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -264,12 +250,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -282,17 +269,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return AsyncLROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: @@ -305,12 +290,11 @@ async def get(self, resource_group_name: str, ip_community_name: str, **kwargs: :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpCommunity or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,45 +308,46 @@ async def get(self, resource_group_name: str, ip_community_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore async def _update_initial( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunityPatch, IO], **kwargs: Any - ) -> Optional[_models.IpCommunity]: - error_map = { + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +360,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpCommunity]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -385,7 +370,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "IpCommunityPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, @@ -393,41 +378,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpCommunity", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -453,14 +438,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -472,7 +449,7 @@ async def begin_update( self, resource_group_name: str, ip_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -487,18 +464,10 @@ async def begin_update( :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str :param body: IP Community properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -507,7 +476,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunityPatch, IO], **kwargs: Any + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.IpCommunity]: """Updates an IP Community. @@ -518,20 +491,9 @@ async def begin_update( :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :param body: IP Community properties to update. Is either a IpCommunityPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: IP Community properties to update. Is either a IpCommunityPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -558,12 +520,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -575,22 +538,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return AsyncLROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, ip_community_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,30 +563,36 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -634,12 +601,12 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -654,14 +621,6 @@ async def begin_delete( :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -675,7 +634,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, ip_community_name=ip_community_name, api_version=api_version, @@ -684,11 +643,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -699,20 +659,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpCommunity"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: """List IP Communities by resource group. Implements IP Communities list by resource group GET method. @@ -720,7 +676,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpCommunity or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -732,7 +687,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -743,16 +698,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -764,13 +717,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) @@ -780,34 +732,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpCommunity"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: """List IP Communities by subscription. Implements IP Communities list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpCommunity or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -819,7 +769,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpCommun api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -830,15 +780,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpCommun def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -850,13 +798,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) @@ -866,23 +813,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py index 4c07806798de..48c65cf87e82 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._ip_extended_communities_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IpExtendedCommunitiesOperations: @@ -58,19 +62,21 @@ class IpExtendedCommunitiesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO], + body: Union[_models.IpExtendedCommunity, IO[bytes]], **kwargs: Any - ) -> _models.IpExtendedCommunity: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "IpExtendedCommunity") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, @@ -101,45 +107,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } - @overload async def begin_create( self, @@ -164,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -184,7 +181,7 @@ async def begin_create( self, resource_group_name: str, ip_extended_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -199,18 +196,10 @@ async def begin_create( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -223,7 +212,7 @@ async def begin_create( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO], + body: Union[_models.IpExtendedCommunity, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.IpExtendedCommunity]: """Create an IP Extended Community. @@ -235,19 +224,9 @@ async def begin_create( :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :param body: Request payload. Is either a IpExtendedCommunity type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpExtendedCommunity type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -275,12 +254,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -293,17 +273,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return AsyncLROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -318,12 +296,11 @@ async def get( :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpExtendedCommunity or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,49 +314,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO], + body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.IpExtendedCommunity]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -392,7 +366,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -402,7 +376,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "IpExtendedCommunityPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, @@ -410,41 +384,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -470,14 +444,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -490,7 +456,7 @@ async def begin_update( self, resource_group_name: str, ip_extended_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -505,18 +471,10 @@ async def begin_update( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: IP Extended Community properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -529,7 +487,7 @@ async def begin_update( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO], + body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.IpExtendedCommunity]: """Updates the IP Extended Community. @@ -542,19 +500,8 @@ async def begin_update( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: IP Extended Community properties to update. Is either a IpExtendedCommunityPatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -582,12 +529,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -599,22 +547,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return AsyncLROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,30 +572,36 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -658,12 +610,12 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -678,14 +630,6 @@ async def begin_delete( :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -699,7 +643,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, api_version=api_version, @@ -708,11 +652,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -723,22 +668,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.IpExtendedCommunity"]: + ) -> AsyncItemPaged["_models.IpExtendedCommunity"]: """List IpExtendedCommunities by resource group. Implements IpExtendedCommunities list by resource group GET method. @@ -746,7 +687,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] @@ -758,7 +698,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -769,16 +709,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -790,13 +728,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) @@ -806,34 +743,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpExtendedCommunity"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpExtendedCommunity"]: """List IpExtendedCommunities by subscription. Implements IpExtendedCommunities list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] @@ -845,7 +780,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpExtend api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -856,15 +791,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpExtend def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -876,13 +809,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) @@ -892,23 +824,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py index 1f0138f04022..7ec80b84dd52 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._ip_prefixes_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IpPrefixesOperations: @@ -58,15 +62,17 @@ class IpPrefixesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO], **kwargs: Any - ) -> _models.IpPrefix: - error_map = { + self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,7 +85,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -89,7 +95,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "IpPrefix") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, @@ -97,45 +103,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpPrefix", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } - @overload async def begin_create( self, @@ -160,14 +165,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -179,7 +176,7 @@ async def begin_create( self, resource_group_name: str, ip_prefix_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -194,18 +191,10 @@ async def begin_create( :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -214,7 +203,7 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO], **kwargs: Any + self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.IpPrefix]: """Create an IP Prefix. @@ -225,19 +214,8 @@ async def begin_create( :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :param body: Request payload. Is either a IpPrefix type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpPrefix type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -264,12 +242,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -282,17 +261,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpPrefix].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return AsyncLROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: @@ -305,12 +282,11 @@ async def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpPrefix or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -324,45 +300,46 @@ async def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore async def _update_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefixPatch, IO], **kwargs: Any - ) -> Optional[_models.IpPrefix]: - error_map = { + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +352,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpPrefix]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -385,7 +362,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "IpPrefixPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, @@ -393,41 +370,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpPrefix", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -453,14 +430,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -472,7 +441,7 @@ async def begin_update( self, resource_group_name: str, ip_prefix_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -487,18 +456,10 @@ async def begin_update( :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str :param body: IP Prefix properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -507,7 +468,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefixPatch, IO], **kwargs: Any + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.IpPrefix]: """Updates the IP Prefix. @@ -518,20 +483,9 @@ async def begin_update( :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -558,12 +512,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -575,22 +530,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.IpPrefix].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return AsyncLROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -602,30 +555,36 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -634,12 +593,12 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> AsyncLROPoller[None]: @@ -652,14 +611,6 @@ async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kw :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -673,7 +624,7 @@ async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kw lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, api_version=api_version, @@ -682,11 +633,12 @@ async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kw params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -697,20 +649,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.IpPrefix"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: """List IpPrefixes by resource group. Implements IpPrefixes list by resource group GET method. @@ -718,7 +666,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpPrefix or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -730,7 +677,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -741,16 +688,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -762,13 +707,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) @@ -778,34 +722,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpPrefix"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: """List IpPrefixes by subscription. Implements IpPrefixes list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpPrefix or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] @@ -817,7 +759,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpPrefix api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -828,15 +770,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.IpPrefix def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -848,13 +788,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) @@ -864,23 +803,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py index 3ac94bc13bc2..cb9f1787cccc 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._l2_isolation_domains_operations import ( build_commit_configuration_request, build_create_request, @@ -42,9 +45,11 @@ build_update_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class L2IsolationDomainsOperations: @@ -61,19 +66,21 @@ class L2IsolationDomainsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO], + body: Union[_models.L2IsolationDomain, IO[bytes]], **kwargs: Any - ) -> _models.L2IsolationDomain: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -96,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "L2IsolationDomain") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -104,40 +111,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } - @overload async def begin_create( self, @@ -163,14 +168,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -183,7 +180,7 @@ async def begin_create( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -199,18 +196,10 @@ async def begin_create( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -223,7 +212,7 @@ async def begin_create( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO], + body: Union[_models.L2IsolationDomain, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.L2IsolationDomain]: """Create L2 Isolation Domain. @@ -236,19 +225,8 @@ async def begin_create( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :param body: Request payload. Is either a L2IsolationDomain type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a L2IsolationDomain type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO[bytes] :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -276,12 +254,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -294,17 +273,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return AsyncLROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -319,12 +296,11 @@ async def get( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: L2IsolationDomain or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,49 +314,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO], + body: Union[_models.L2IsolationDomainPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.L2IsolationDomain]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +366,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -403,7 +376,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "L2IsolationDomainPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -411,41 +384,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -471,14 +444,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -491,7 +456,7 @@ async def begin_update( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -506,18 +471,10 @@ async def begin_update( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -530,7 +487,7 @@ async def begin_update( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO], + body: Union[_models.L2IsolationDomainPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.L2IsolationDomain]: """Updates the L2 Isolation Domain. @@ -543,19 +500,8 @@ async def begin_update( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - L2IsolationDomainPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + L2IsolationDomainPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -583,12 +529,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -600,22 +547,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return AsyncLROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,38 +572,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -673,14 +624,6 @@ async def begin_delete( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -694,7 +637,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, api_version=api_version, @@ -703,11 +646,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -718,26 +662,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore async def _update_administrative_state_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,7 +690,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -760,7 +700,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -768,43 +708,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -829,14 +768,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -849,7 +780,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -864,18 +795,10 @@ async def begin_update_administrative_state( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -888,7 +811,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Implements the operation to the underlying resources. @@ -900,20 +823,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -941,12 +853,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -958,22 +871,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -985,50 +896,49 @@ async def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration" - } - @distributed_trace_async async def begin_validate_configuration( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any @@ -1040,14 +950,6 @@ async def begin_validate_configuration( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1072,12 +974,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1089,22 +992,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _commit_configuration_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1116,50 +1017,49 @@ async def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration" - } - @distributed_trace_async async def begin_commit_configuration( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any @@ -1173,14 +1073,6 @@ async def begin_commit_configuration( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1205,12 +1097,13 @@ async def begin_commit_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1222,22 +1115,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.L2IsolationDomain"]: + ) -> AsyncItemPaged["_models.L2IsolationDomain"]: """List L2IsolationDomains by resource group. Displays L2IsolationDomains list by resource group GET method. @@ -1245,7 +1136,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] @@ -1257,7 +1147,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,16 +1158,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1289,13 +1177,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) @@ -1305,34 +1192,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L2IsolationDomain"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L2IsolationDomain"]: """List L2IsolationDomains by subscription. Displays L2IsolationDomains list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] @@ -1344,7 +1229,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L2Isolat api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1355,15 +1240,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L2Isolat def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1375,13 +1258,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) @@ -1391,23 +1273,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py index 1be279fc8305..4333fc8854bd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._l3_isolation_domains_operations import ( build_commit_configuration_request, build_create_request, @@ -42,9 +45,11 @@ build_update_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class L3IsolationDomainsOperations: @@ -61,19 +66,21 @@ class L3IsolationDomainsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO], + body: Union[_models.L3IsolationDomain, IO[bytes]], **kwargs: Any - ) -> _models.L3IsolationDomain: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -96,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "L3IsolationDomain") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -104,40 +111,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } - @overload async def begin_create( self, @@ -164,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -184,7 +181,7 @@ async def begin_create( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -201,18 +198,10 @@ async def begin_create( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -225,7 +214,7 @@ async def begin_create( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO], + body: Union[_models.L3IsolationDomain, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.L3IsolationDomain]: """Create L3 Isolation Domain. @@ -239,19 +228,8 @@ async def begin_create( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :param body: Request payload. Is either a L3IsolationDomain type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a L3IsolationDomain type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO[bytes] :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -279,12 +257,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -297,17 +276,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return AsyncLROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -322,12 +299,11 @@ async def get( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: L3IsolationDomain or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -341,49 +317,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO], + body: Union[_models.L3IsolationDomainPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.L3IsolationDomain]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -396,7 +369,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -406,7 +379,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "L3IsolationDomainPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -414,41 +387,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -474,14 +447,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -494,7 +459,7 @@ async def begin_update( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -509,18 +474,10 @@ async def begin_update( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -533,7 +490,7 @@ async def begin_update( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO], + body: Union[_models.L3IsolationDomainPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.L3IsolationDomain]: """Updates a L3 Isolation Domain. @@ -546,19 +503,8 @@ async def begin_update( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: API to update certain properties of the L3 Isolation Domain resource. Is either a - L3IsolationDomainPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + L3IsolationDomainPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -586,12 +532,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -603,22 +550,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return AsyncLROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -630,38 +575,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -676,14 +627,6 @@ async def begin_delete( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -697,7 +640,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, api_version=api_version, @@ -706,11 +649,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -721,22 +665,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.L3IsolationDomain"]: + ) -> AsyncItemPaged["_models.L3IsolationDomain"]: """List L3IsolationDomains by resource group. Displays L3IsolationDomains list by resource group GET method. @@ -744,7 +684,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] @@ -756,7 +695,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -767,16 +706,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -788,13 +725,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) @@ -804,34 +740,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L3IsolationDomain"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L3IsolationDomain"]: """List L3IsolationDomains by subscription. Displays L3IsolationDomains list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] @@ -843,7 +777,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L3Isolat api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,15 +788,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.L3Isolat def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -874,13 +806,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) @@ -890,35 +821,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - } - async def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -931,7 +861,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -941,7 +871,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -949,43 +879,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -1010,14 +939,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1030,7 +951,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1045,18 +966,10 @@ async def begin_update_administrative_state( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1069,7 +982,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """executes enable operation to the underlying resources. @@ -1081,20 +994,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1122,12 +1024,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1139,22 +1042,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1166,50 +1067,49 @@ async def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration" - } - @distributed_trace_async async def begin_validate_configuration( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any @@ -1221,14 +1121,6 @@ async def begin_validate_configuration( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1253,12 +1145,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1270,22 +1163,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _commit_configuration_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1297,50 +1188,49 @@ async def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration" - } - @distributed_trace_async async def begin_commit_configuration( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any @@ -1354,14 +1244,6 @@ async def begin_commit_configuration( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1386,12 +1268,13 @@ async def begin_commit_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1403,14 +1286,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py index d9211f33ae1f..de8733f32b2f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._neighbor_groups_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NeighborGroupsOperations: @@ -58,15 +62,21 @@ class NeighborGroupsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, neighbor_group_name: str, body: Union[_models.NeighborGroup, IO], **kwargs: Any - ) -> _models.NeighborGroup: - error_map = { + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -89,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NeighborGroup") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, @@ -97,40 +107,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NeighborGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } - @overload async def begin_create( self, @@ -155,14 +163,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -175,7 +175,7 @@ async def begin_create( self, resource_group_name: str, neighbor_group_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -190,18 +190,10 @@ async def begin_create( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -211,7 +203,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, neighbor_group_name: str, body: Union[_models.NeighborGroup, IO], **kwargs: Any + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NeighborGroup]: """Creates the Neighbor Group. @@ -222,19 +218,8 @@ async def begin_create( :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :param body: Request payload. Is either a NeighborGroup type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NeighborGroup type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO[bytes] :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -262,12 +247,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -280,17 +266,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return AsyncLROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: @@ -303,12 +287,11 @@ async def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NeighborGroup or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,49 +305,46 @@ async def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO], + body: Union[_models.NeighborGroupPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NeighborGroup]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -377,7 +357,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NeighborGroup]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -387,7 +367,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NeighborGroupPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, @@ -395,41 +375,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NeighborGroup", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -455,14 +435,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -475,7 +447,7 @@ async def begin_update( self, resource_group_name: str, neighbor_group_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -490,18 +462,10 @@ async def begin_update( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -514,7 +478,7 @@ async def begin_update( self, resource_group_name: str, neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO], + body: Union[_models.NeighborGroupPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NeighborGroup]: """API to update certain properties of the Neighbor Group Resources. @@ -527,19 +491,8 @@ async def begin_update( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Neighbor Group properties to update. Only annotations are supported. Is either a - NeighborGroupPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NeighborGroupPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of cls(response) :rtype: @@ -567,12 +520,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -584,22 +538,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return AsyncLROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -611,38 +563,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -657,14 +615,6 @@ async def begin_delete( :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -678,7 +628,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, api_version=api_version, @@ -687,11 +637,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -702,20 +653,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NeighborGroup"]: + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NeighborGroup"]: """List Neighbor Groups by resource group. Displays NeighborGroups list by resource group GET method. @@ -723,7 +672,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NeighborGroup or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -735,7 +683,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -746,16 +694,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -767,13 +713,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) @@ -783,34 +728,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NeighborGroup"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NeighborGroup"]: """List Neighbor Groups by subscription. Displays NeighborGroups list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NeighborGroup or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -822,7 +765,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Neighbor api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,15 +776,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Neighbor def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -853,13 +794,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) @@ -869,23 +809,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py index 3df8c219a60a..798ad0a2d767 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,19 +20,20 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_device_skus_operations import build_get_request, build_list_by_subscription_request +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkDeviceSkusOperations: @@ -48,10 +50,12 @@ class NetworkDeviceSkusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: @@ -61,12 +65,11 @@ async def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.Netw :param network_device_sku_name: Name of the Network Device SKU. Required. :type network_device_sku_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkDeviceSku or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80,47 +83,43 @@ async def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.Netw api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( network_device_sku_name=network_device_sku_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkDeviceSku", pipeline_response) + deserialized = self._deserialize("NetworkDeviceSku", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}" - } + return deserialized # type: ignore @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkDeviceSku"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDeviceSku"]: """List Network Device SKUs by subscription. List Network Device SKUs for the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDeviceSku or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] @@ -132,7 +131,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkD api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDeviceSkusListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,15 +142,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkD def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -163,13 +160,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDeviceSkusListResult", pipeline_response) @@ -179,23 +175,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py index 26830b0baf90..abfdb5beb0bd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_devices_operations import ( build_create_request, build_delete_request, @@ -43,9 +46,11 @@ build_update_request, build_upgrade_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkDevicesOperations: @@ -62,15 +67,21 @@ class NetworkDevicesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, network_device_name: str, body: Union[_models.NetworkDevice, IO], **kwargs: Any - ) -> _models.NetworkDevice: - error_map = { + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +94,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +104,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkDevice") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -101,40 +112,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkDevice", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } - @overload async def begin_create( self, @@ -159,14 +168,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -179,7 +180,7 @@ async def begin_create( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -194,18 +195,10 @@ async def begin_create( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -215,7 +208,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, network_device_name: str, body: Union[_models.NetworkDevice, IO], **kwargs: Any + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkDevice]: """Create Network Device. @@ -226,19 +223,8 @@ async def begin_create( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a NetworkDevice type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkDevice type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -266,12 +252,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -284,17 +271,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return AsyncLROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: @@ -307,12 +292,11 @@ async def get(self, resource_group_name: str, network_device_name: str, **kwargs :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkDevice or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -326,49 +310,46 @@ async def get(self, resource_group_name: str, network_device_name: str, **kwargs api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO], + body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkDevice]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -381,7 +362,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkDevice]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -391,7 +372,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkDevicePatchParameters") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -399,41 +380,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkDevice", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -459,14 +440,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -479,7 +452,7 @@ async def begin_update( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -494,18 +467,10 @@ async def begin_update( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Network Device properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -518,7 +483,7 @@ async def begin_update( self, resource_group_name: str, network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO], + body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkDevice]: """Updates a Network Device. @@ -531,19 +496,8 @@ async def begin_update( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Network Device properties to update. Is either a NetworkDevicePatchParameters type - or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of cls(response) :rtype: @@ -571,12 +525,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -588,22 +543,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return AsyncLROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -615,38 +568,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -661,14 +620,6 @@ async def begin_delete( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -682,7 +633,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_device_name=network_device_name, api_version=api_version, @@ -691,11 +642,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -706,20 +658,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkDevice"]: + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkDevice"]: """List NetworkDevices by resource group. List all the Network Device resources in a given resource group. @@ -727,7 +677,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDevice or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -739,7 +688,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -750,16 +699,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -771,13 +718,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) @@ -787,34 +733,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkDevice"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDevice"]: """List NetworkDevices by subscription. List all the Network Device resources in a given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDevice or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -826,7 +770,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkD api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -837,15 +781,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkD def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -857,13 +799,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) @@ -873,35 +814,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - } - async def _reboot_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.RebootProperties, IO], + body: Union[_models.RebootProperties, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,7 +854,7 @@ async def _reboot_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -924,7 +864,7 @@ async def _reboot_initial( else: _json = self._serialize.body(body, "RebootProperties") - request = build_reboot_request( + _request = build_reboot_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -932,43 +872,42 @@ async def _reboot_initial( content_type=content_type, json=_json, content=_content, - template_url=self._reboot_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _reboot_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot" - } - @overload async def begin_reboot( self, @@ -993,14 +932,6 @@ async def begin_reboot( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1013,7 +944,7 @@ async def begin_reboot( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1028,18 +959,10 @@ async def begin_reboot( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1052,7 +975,7 @@ async def begin_reboot( self, resource_group_name: str, network_device_name: str, - body: Union[_models.RebootProperties, IO], + body: Union[_models.RebootProperties, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1064,19 +987,8 @@ async def begin_reboot( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a RebootProperties type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a RebootProperties type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1104,12 +1016,13 @@ async def begin_reboot( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1121,22 +1034,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_reboot.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _refresh_configuration_initial( self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1148,50 +1059,49 @@ async def _refresh_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_refresh_configuration_request( + _request = build_refresh_configuration_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._refresh_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _refresh_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration" - } - @distributed_trace_async async def begin_refresh_configuration( self, resource_group_name: str, network_device_name: str, **kwargs: Any @@ -1205,14 +1115,6 @@ async def begin_refresh_configuration( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1237,12 +1139,13 @@ async def begin_refresh_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1254,26 +1157,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_refresh_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _update_administrative_state_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO], + body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1286,7 +1187,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1296,7 +1197,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateDeviceAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -1304,43 +1205,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -1365,14 +1265,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1385,7 +1277,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1400,18 +1292,10 @@ async def begin_update_administrative_state( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1424,7 +1308,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO], + body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1436,20 +1320,10 @@ async def begin_update_administrative_state( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or + IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1477,12 +1351,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1494,22 +1369,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _upgrade_initial( - self, resource_group_name: str, network_device_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateVersion, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1522,7 +1399,7 @@ async def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1532,7 +1409,7 @@ async def _upgrade_initial( else: _json = self._serialize.body(body, "UpdateVersion") - request = build_upgrade_request( + _request = build_upgrade_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -1540,43 +1417,42 @@ async def _upgrade_initial( content_type=content_type, json=_json, content=_content, - template_url=self._upgrade_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _upgrade_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade" - } - @overload async def begin_upgrade( self, @@ -1601,14 +1477,6 @@ async def begin_upgrade( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1621,7 +1489,7 @@ async def begin_upgrade( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1636,18 +1504,10 @@ async def begin_upgrade( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1657,7 +1517,11 @@ async def begin_upgrade( @distributed_trace_async async def begin_upgrade( - self, resource_group_name: str, network_device_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateVersion, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1668,19 +1532,8 @@ async def begin_upgrade( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a UpdateVersion type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a UpdateVersion type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1708,12 +1561,13 @@ async def begin_upgrade( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1725,14 +1579,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_upgrade.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py index 4364590cdc66..8bb3987d7d9c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_fabric_controllers_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkFabricControllersOperations: @@ -58,19 +62,21 @@ class NetworkFabricControllersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO], + body: Union[_models.NetworkFabricController, IO[bytes]], **kwargs: Any - ) -> _models.NetworkFabricController: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkFabricController") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, @@ -101,40 +107,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } - @overload async def begin_create( self, @@ -159,14 +163,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -179,7 +175,7 @@ async def begin_create( self, resource_group_name: str, network_fabric_controller_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -194,18 +190,10 @@ async def begin_create( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -218,7 +206,7 @@ async def begin_create( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO], + body: Union[_models.NetworkFabricController, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkFabricController]: """Create Network fabric controller. @@ -230,19 +218,9 @@ async def begin_create( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :param body: Request payload. Is either a NetworkFabricController type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkFabricController type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -270,12 +248,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -288,17 +267,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return AsyncLROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -313,12 +290,11 @@ async def get( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabricController or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,49 +308,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO], + body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkFabricController]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +360,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkFabricController]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -397,7 +370,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkFabricControllerPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, @@ -405,41 +378,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -465,14 +438,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -485,7 +450,7 @@ async def begin_update( self, resource_group_name: str, network_fabric_controller_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -500,18 +465,10 @@ async def begin_update( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Network Fabric Controller properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -524,7 +481,7 @@ async def begin_update( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO], + body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkFabricController]: """Updates a Network Fabric Controller. @@ -537,19 +494,8 @@ async def begin_update( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Network Fabric Controller properties to update. Is either a - NetworkFabricControllerPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkFabricControllerPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -577,12 +523,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -594,22 +541,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return AsyncLROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,42 +566,48 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -671,14 +622,6 @@ async def begin_delete( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -692,7 +635,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, api_version=api_version, @@ -701,11 +644,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -716,22 +660,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkFabricController"]: + ) -> AsyncItemPaged["_models.NetworkFabricController"]: """List NetworkFabricControllers by resource group. Lists all the NetworkFabricControllers thats available in the resource group. @@ -739,7 +679,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricController or the result of cls(response) :rtype: @@ -752,7 +691,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -763,16 +702,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -784,13 +721,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) @@ -800,34 +736,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkFabricController"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricController"]: """List NetworkFabricControllers by subscription. Lists all the NetworkFabricControllers by subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricController or the result of cls(response) :rtype: @@ -840,7 +774,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -851,15 +785,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -871,13 +803,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) @@ -887,23 +818,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py index 0855875a9902..0d9be7140112 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,19 +20,20 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_fabric_skus_operations import build_get_request, build_list_by_subscription_request +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkFabricSkusOperations: @@ -48,10 +50,12 @@ class NetworkFabricSkusOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: @@ -61,12 +65,11 @@ async def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.Netw :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. :type network_fabric_sku_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabricSku or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -80,47 +83,43 @@ async def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.Netw api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( network_fabric_sku_name=network_fabric_sku_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabricSku", pipeline_response) + deserialized = self._deserialize("NetworkFabricSku", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}" - } + return deserialized # type: ignore @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkFabricSku"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricSku"]: """List Network Fabric SKUs by subscription. Implements Network Fabric SKUs list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricSku or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] @@ -132,7 +131,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricSkusListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -143,15 +142,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -163,13 +160,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricSkusListResult", pipeline_response) @@ -179,23 +175,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py index 0db6fdcd4d72..f527596484fc 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_fabrics_operations import ( build_commit_configuration_request, build_create_request, @@ -48,9 +51,11 @@ build_upgrade_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkFabricsOperations: # pylint: disable=too-many-public-methods @@ -67,15 +72,21 @@ class NetworkFabricsOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.NetworkFabric, IO], **kwargs: Any - ) -> _models.NetworkFabric: - error_map = { + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -88,7 +99,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -98,7 +109,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkFabric") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -106,45 +117,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabric", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } - @overload async def begin_create( self, @@ -169,14 +179,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -189,7 +191,7 @@ async def begin_create( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -204,18 +206,10 @@ async def begin_create( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -225,7 +219,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.NetworkFabric, IO], **kwargs: Any + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkFabric]: """Create Network Fabric. @@ -236,19 +234,8 @@ async def begin_create( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a NetworkFabric type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkFabric type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -276,12 +263,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -294,17 +282,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return AsyncLROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: @@ -317,12 +303,11 @@ async def get(self, resource_group_name: str, network_fabric_name: str, **kwargs :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabric or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -336,49 +321,46 @@ async def get(self, resource_group_name: str, network_fabric_name: str, **kwargs api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO], + body: Union[_models.NetworkFabricPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkFabric]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -391,7 +373,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkFabric]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -401,7 +383,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkFabricPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -409,41 +391,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabric", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -469,14 +451,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -489,7 +463,7 @@ async def begin_update( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -504,18 +478,10 @@ async def begin_update( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -528,7 +494,7 @@ async def begin_update( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO], + body: Union[_models.NetworkFabricPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkFabric]: """Updates a Network Fabric. @@ -540,20 +506,9 @@ async def begin_update( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a IO - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of cls(response) :rtype: @@ -581,12 +536,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -598,22 +554,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return AsyncLROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -625,42 +579,48 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -675,14 +635,6 @@ async def begin_delete( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -696,7 +648,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, api_version=api_version, @@ -705,11 +657,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -720,20 +673,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkFabric"]: + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkFabric"]: """List Network Fabrics by resource group. List all the Network Fabric resources in the given resource group. @@ -741,7 +692,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabric or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -753,7 +703,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -764,16 +714,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -785,13 +733,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) @@ -801,34 +748,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkFabric"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabric"]: """List Network Fabrics by subscription. List all the Network Fabric resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabric or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -840,7 +785,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -851,15 +796,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkF def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -871,13 +814,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) @@ -887,31 +829,30 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - } - async def _provision_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -923,50 +864,49 @@ async def _provision_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_provision_request( + _request = build_provision_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._provision_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _provision_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision" - } - @distributed_trace_async async def begin_provision( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -980,14 +920,6 @@ async def begin_provision( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1012,12 +944,13 @@ async def begin_provision( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1029,22 +962,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_provision.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _deprovision_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1056,50 +987,49 @@ async def _deprovision_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_deprovision_request( + _request = build_deprovision_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._deprovision_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _deprovision_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision" - } - @distributed_trace_async async def begin_deprovision( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -1113,14 +1043,6 @@ async def begin_deprovision( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1145,12 +1067,13 @@ async def begin_deprovision( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1162,22 +1085,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_deprovision.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _upgrade_initial( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1190,7 +1115,7 @@ async def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1198,9 +1123,9 @@ async def _upgrade_initial( if isinstance(body, (IOBase, bytes)): _content = body else: - _json = self._serialize.body(body, "UpdateVersion") + _json = self._serialize.body(body, "UpgradeNetworkFabricProperties") - request = build_upgrade_request( + _request = build_upgrade_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -1208,49 +1133,48 @@ async def _upgrade_initial( content_type=content_type, json=_json, content=_content, - template_url=self._upgrade_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _upgrade_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade" - } - @overload async def begin_upgrade( self, resource_group_name: str, network_fabric_name: str, - body: _models.UpdateVersion, + body: _models.UpgradeNetworkFabricProperties, *, content_type: str = "application/json", **kwargs: Any @@ -1265,18 +1189,10 @@ async def begin_upgrade( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1289,7 +1205,7 @@ async def begin_upgrade( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1304,18 +1220,10 @@ async def begin_upgrade( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1325,7 +1233,11 @@ async def begin_upgrade( @distributed_trace_async async def begin_upgrade( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1336,20 +1248,9 @@ async def begin_upgrade( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a UpdateVersion type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Fabric properties to update. Is either a UpgradeNetworkFabricProperties + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1377,12 +1278,13 @@ async def begin_upgrade( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1394,22 +1296,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_upgrade.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _refresh_configuration_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1421,50 +1321,49 @@ async def _refresh_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_refresh_configuration_request( + _request = build_refresh_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._refresh_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _refresh_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration" - } - @distributed_trace_async async def begin_refresh_configuration( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -1478,14 +1377,6 @@ async def begin_refresh_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1510,12 +1401,13 @@ async def begin_refresh_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1527,26 +1419,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_refresh_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _update_workload_management_bfd_configuration_initial( + async def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1559,7 +1449,7 @@ async def _update_workload_management_bfd_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1569,7 +1459,7 @@ async def _update_workload_management_bfd_configuration_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_workload_management_bfd_configuration_request( + _request = build_update_workload_management_bfd_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -1577,45 +1467,44 @@ async def _update_workload_management_bfd_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_workload_management_bfd_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_workload_management_bfd_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration" - } - @overload - async def begin_update_workload_management_bfd_configuration( + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -1639,14 +1528,6 @@ async def begin_update_workload_management_bfd_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1655,11 +1536,11 @@ async def begin_update_workload_management_bfd_configuration( """ @overload - async def begin_update_workload_management_bfd_configuration( + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1675,18 +1556,10 @@ async def begin_update_workload_management_bfd_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1695,11 +1568,11 @@ async def begin_update_workload_management_bfd_configuration( """ @distributed_trace_async - async def begin_update_workload_management_bfd_configuration( + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1712,20 +1585,9 @@ async def begin_update_workload_management_bfd_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1753,12 +1615,13 @@ async def begin_update_workload_management_bfd_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1770,26 +1633,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_workload_management_bfd_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _update_infra_management_bfd_configuration_initial( + async def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1802,7 +1663,7 @@ async def _update_infra_management_bfd_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1812,7 +1673,7 @@ async def _update_infra_management_bfd_configuration_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_infra_management_bfd_configuration_request( + _request = build_update_infra_management_bfd_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -1820,45 +1681,44 @@ async def _update_infra_management_bfd_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_infra_management_bfd_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_infra_management_bfd_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration" - } - @overload - async def begin_update_infra_management_bfd_configuration( + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -1882,14 +1742,6 @@ async def begin_update_infra_management_bfd_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1898,11 +1750,11 @@ async def begin_update_infra_management_bfd_configuration( """ @overload - async def begin_update_infra_management_bfd_configuration( + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1918,18 +1770,10 @@ async def begin_update_infra_management_bfd_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1938,11 +1782,11 @@ async def begin_update_infra_management_bfd_configuration( """ @distributed_trace_async - async def begin_update_infra_management_bfd_configuration( + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1955,20 +1799,9 @@ async def begin_update_infra_management_bfd_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1996,12 +1829,13 @@ async def begin_update_infra_management_bfd_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2013,26 +1847,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_infra_management_bfd_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO], + body: Union[_models.ValidateConfigurationProperties, IO[bytes]], **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2045,7 +1877,7 @@ async def _validate_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -2055,7 +1887,7 @@ async def _validate_configuration_initial( else: _json = self._serialize.body(body, "ValidateConfigurationProperties") - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -2063,43 +1895,42 @@ async def _validate_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration" - } - @overload async def begin_validate_configuration( self, @@ -2124,14 +1955,6 @@ async def begin_validate_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2144,7 +1967,7 @@ async def begin_validate_configuration( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -2159,18 +1982,10 @@ async def begin_validate_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Validate configuration properties. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2183,7 +1998,7 @@ async def begin_validate_configuration( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO], + body: Union[_models.ValidateConfigurationProperties, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: """Implements the operation to the underlying resources. @@ -2196,19 +2011,9 @@ async def begin_validate_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Validate configuration properties. Is either a ValidateConfigurationProperties - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or + IO[bytes] :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2236,12 +2041,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2253,22 +2059,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _get_topology_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2280,50 +2084,49 @@ async def _get_topology_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_get_topology_request( + _request = build_get_topology_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._get_topology_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _get_topology_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology" - } - @distributed_trace_async async def begin_get_topology( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -2337,14 +2140,6 @@ async def begin_get_topology( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2369,12 +2164,13 @@ async def begin_get_topology( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2386,22 +2182,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get_topology.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _commit_configuration_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2413,50 +2207,49 @@ async def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration" - } - @distributed_trace_async async def begin_commit_configuration( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -2471,14 +2264,6 @@ async def begin_commit_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2503,12 +2288,13 @@ async def begin_commit_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2520,14 +2306,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py index 58d3595393ca..d6ebee0ec662 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_interfaces_operations import ( build_create_request, build_delete_request, @@ -39,9 +42,11 @@ build_update_administrative_state_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkInterfacesOperations: @@ -58,20 +63,22 @@ class NetworkInterfacesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterface, IO], + body: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any - ) -> _models.NetworkInterface: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -84,7 +91,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -94,7 +101,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkInterface") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -103,40 +110,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkInterface", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } - @overload async def begin_create( self, @@ -164,14 +169,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -185,7 +182,7 @@ async def begin_create( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -202,18 +199,10 @@ async def begin_create( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -227,7 +216,7 @@ async def begin_create( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterface, IO], + body: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkInterface]: """Create NetworkInterface. @@ -241,19 +230,8 @@ async def begin_create( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :param body: Request payload. Is either a NetworkInterface type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkInterface type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -282,12 +260,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -300,17 +279,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return AsyncLROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -327,12 +304,11 @@ async def get( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -346,51 +322,48 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO], + body: Union[_models.NetworkInterfacePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkInterface]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -403,7 +376,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkInterface]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -413,7 +386,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkInterfacePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -422,41 +395,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkInterface", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -485,14 +458,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -506,7 +471,7 @@ async def begin_update( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -523,18 +488,10 @@ async def begin_update( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -548,7 +505,7 @@ async def begin_update( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO], + body: Union[_models.NetworkInterfacePatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkInterface]: """Updates a NetworkInterface. @@ -563,19 +520,8 @@ async def begin_update( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: NetworkInterface properties to update. Only tags are supported. Is either a - NetworkInterfacePatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkInterfacePatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) :rtype: @@ -604,12 +550,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -621,22 +568,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return AsyncLROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,39 +593,45 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -697,14 +648,6 @@ async def begin_delete( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -718,7 +661,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -728,11 +671,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -743,22 +687,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_network_device( self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterface"]: + ) -> AsyncItemPaged["_models.NetworkInterface"]: """List all Network Interfaces that are available using an Network Device. List all the Network Interface resources in a given resource group. @@ -768,7 +708,6 @@ def list_by_network_device( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterface or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -780,7 +719,7 @@ def list_by_network_device( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkInterfacesList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -791,17 +730,15 @@ def list_by_network_device( def prepare_request(next_link=None): if not next_link: - request = build_list_by_network_device_request( + _request = build_list_by_network_device_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_network_device.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -813,13 +750,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkInterfacesList", pipeline_response) @@ -829,36 +765,35 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_network_device.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces" - } - async def _update_administrative_state_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -871,7 +806,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -881,7 +816,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -890,43 +825,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -954,14 +888,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -975,7 +901,7 @@ async def begin_update_administrative_state( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -992,18 +918,10 @@ async def begin_update_administrative_state( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1017,7 +935,7 @@ async def begin_update_administrative_state( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates the admin state of the network interface. @@ -1031,20 +949,9 @@ async def begin_update_administrative_state( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1073,12 +980,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1090,14 +998,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py index ed2196bfc9f3..6843f04414ee 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_packet_brokers_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkPacketBrokersOperations: @@ -58,19 +62,21 @@ class NetworkPacketBrokersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO], + body: Union[_models.NetworkPacketBroker, IO[bytes]], **kwargs: Any - ) -> _models.NetworkPacketBroker: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -83,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -93,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkPacketBroker") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, @@ -101,40 +107,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } - @overload async def begin_create( self, @@ -159,14 +163,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -179,7 +175,7 @@ async def begin_create( self, resource_group_name: str, network_packet_broker_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -194,18 +190,10 @@ async def begin_create( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -218,7 +206,7 @@ async def begin_create( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO], + body: Union[_models.NetworkPacketBroker, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkPacketBroker]: """Create Network Packet Broker. @@ -230,19 +218,9 @@ async def begin_create( :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :param body: Request payload. Is either a NetworkPacketBroker type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkPacketBroker type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -270,12 +248,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -288,17 +267,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return AsyncLROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -313,12 +290,11 @@ async def get( :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkPacketBroker or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -332,49 +308,46 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO], + body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkPacketBroker]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -387,7 +360,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -397,7 +370,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkPacketBrokerPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, @@ -405,41 +378,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -465,14 +438,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -485,7 +450,7 @@ async def begin_update( self, resource_group_name: str, network_packet_broker_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -500,18 +465,10 @@ async def begin_update( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Network Packet Broker properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -524,7 +481,7 @@ async def begin_update( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO], + body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkPacketBroker]: """Updates the Network Packet Broker. @@ -537,19 +494,8 @@ async def begin_update( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Network Packet Broker properties to update. Is either a NetworkPacketBrokerPatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -577,12 +523,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -594,22 +541,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return AsyncLROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,38 +566,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -667,14 +618,6 @@ async def begin_delete( :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -688,7 +631,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, api_version=api_version, @@ -697,11 +640,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -712,22 +656,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkPacketBroker"]: + ) -> AsyncItemPaged["_models.NetworkPacketBroker"]: """List all Network Packet Brokers under resource group. Displays NetworkPacketBrokers list by resource group GET method. @@ -735,7 +675,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] @@ -747,7 +686,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -758,16 +697,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -779,13 +716,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) @@ -795,34 +731,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkPacketBroker"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkPacketBroker"]: """List Network Packet Brokers by subscription. Displays Network Packet Brokers list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] @@ -834,7 +768,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkP api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -845,15 +779,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkP def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -865,13 +797,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) @@ -881,23 +812,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py index f6d4fe5de258..ae848360c582 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +18,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_racks_operations import ( build_create_request, build_delete_request, @@ -39,9 +41,11 @@ build_list_by_subscription_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkRacksOperations: @@ -58,15 +62,21 @@ class NetworkRacksOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.NetworkRack, IO], **kwargs: Any - ) -> _models.NetworkRack: - error_map = { + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,7 +89,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -89,7 +99,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkRack") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, @@ -97,40 +107,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkRack", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } - @overload async def begin_create( self, @@ -155,14 +163,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -174,7 +174,7 @@ async def begin_create( self, resource_group_name: str, network_rack_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -189,18 +189,10 @@ async def begin_create( :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -209,7 +201,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.NetworkRack, IO], **kwargs: Any + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkRack]: """Create Network Rack. @@ -220,19 +216,8 @@ async def begin_create( :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :param body: Request payload. Is either a NetworkRack type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkRack type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -259,12 +244,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -277,17 +263,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkRack].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return AsyncLROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: @@ -300,12 +284,11 @@ async def get(self, resource_group_name: str, network_rack_name: str, **kwargs: :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkRack or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -319,45 +302,46 @@ async def get(self, resource_group_name: str, network_rack_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore async def _update_initial( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.TagsUpdate, IO], **kwargs: Any - ) -> Optional[_models.NetworkRack]: - error_map = { + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.TagsUpdate, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +354,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkRack]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -380,7 +364,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "TagsUpdate") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, @@ -388,41 +372,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkRack", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -448,14 +432,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -467,7 +443,7 @@ async def begin_update( self, resource_group_name: str, network_rack_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -482,18 +458,10 @@ async def begin_update( :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str :param body: Network Rack properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -502,7 +470,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.TagsUpdate, IO], **kwargs: Any + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.TagsUpdate, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkRack]: """Updates a Network Rack. @@ -513,20 +485,9 @@ async def begin_update( :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -553,12 +514,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -570,22 +532,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkRack].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return AsyncLROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_rack_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,38 +557,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -643,14 +609,6 @@ async def begin_delete( :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -664,7 +622,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_rack_name=network_rack_name, api_version=api_version, @@ -673,11 +631,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -688,20 +647,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkRack"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: """List Network Racks by resource group. List all Network Rack resources in the given resource group. @@ -709,7 +664,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkRack or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -721,7 +675,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -732,16 +686,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -753,13 +705,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) @@ -769,34 +720,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkRack"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: """List Network Racks by subscription. List all Network Rack resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkRack or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -808,7 +757,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkR api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -819,15 +768,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkR def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -839,13 +786,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) @@ -855,23 +801,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py index 98f109303fcb..335d72964d58 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_tap_rules_operations import ( build_create_request, build_delete_request, @@ -42,9 +45,11 @@ build_update_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkTapRulesOperations: @@ -61,19 +66,21 @@ class NetworkTapRulesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO], + body: Union[_models.NetworkTapRule, IO[bytes]], **kwargs: Any - ) -> _models.NetworkTapRule: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -86,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -96,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkTapRule") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -104,45 +111,44 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTapRule", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } - @overload async def begin_create( self, @@ -167,14 +173,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -187,7 +185,7 @@ async def begin_create( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -202,18 +200,10 @@ async def begin_create( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -226,7 +216,7 @@ async def begin_create( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO], + body: Union[_models.NetworkTapRule, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkTapRule]: """Create Network Tap Rule. @@ -238,19 +228,8 @@ async def begin_create( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :param body: Request payload. Is either a NetworkTapRule type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkTapRule type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -278,12 +257,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -296,17 +276,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return AsyncLROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: @@ -319,12 +297,11 @@ async def get(self, resource_group_name: str, network_tap_rule_name: str, **kwar :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkTapRule or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -338,49 +315,46 @@ async def get(self, resource_group_name: str, network_tap_rule_name: str, **kwar api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO], + body: Union[_models.NetworkTapRulePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkTapRule]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +367,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkTapRule]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -403,7 +377,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkTapRulePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -411,41 +385,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTapRule", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -471,14 +445,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -491,7 +457,7 @@ async def begin_update( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -506,18 +472,10 @@ async def begin_update( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Network Tap Rule properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -530,7 +488,7 @@ async def begin_update( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO], + body: Union[_models.NetworkTapRulePatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkTapRule]: """Updates a Network Tap Rule. @@ -543,19 +501,8 @@ async def begin_update( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Network Tap Rule properties to update. Is either a NetworkTapRulePatch type or a - IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: @@ -583,12 +530,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -600,22 +548,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return AsyncLROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,42 +573,48 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -677,14 +629,6 @@ async def begin_delete( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -698,7 +642,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, api_version=api_version, @@ -707,11 +651,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -722,22 +667,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkTapRule"]: + ) -> AsyncItemPaged["_models.NetworkTapRule"]: """List Network Tap Rules by resource group. List all the Network Tap Rule resources in the given resource group. @@ -745,7 +686,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -757,7 +697,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -768,16 +708,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -789,13 +727,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) @@ -805,34 +742,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkTapRule"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTapRule"]: """List NetworkTapRules by subscription. List all the Network Tap Rule resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -844,7 +779,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkT api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -855,15 +790,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkT def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -875,13 +808,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) @@ -891,35 +823,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - } - async def _update_administrative_state_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -932,7 +863,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -942,7 +873,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -950,43 +881,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -1011,14 +941,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1031,7 +953,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1046,18 +968,10 @@ async def begin_update_administrative_state( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1070,7 +984,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates administrative state of Network Tap Rules. @@ -1082,20 +996,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1123,12 +1026,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1140,22 +1044,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _resync_initial( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1167,50 +1069,49 @@ async def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync" - } - @distributed_trace_async async def begin_resync( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any @@ -1224,14 +1125,6 @@ async def begin_resync( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1256,12 +1149,13 @@ async def begin_resync( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1273,22 +1167,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1300,50 +1192,49 @@ async def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration" - } - @distributed_trace_async async def begin_validate_configuration( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any @@ -1357,14 +1248,6 @@ async def begin_validate_configuration( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1389,12 +1272,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1406,14 +1290,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py index 37958712ff40..e33eb8f444bd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_taps_operations import ( build_create_request, build_delete_request, @@ -41,9 +44,11 @@ build_update_administrative_state_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkTapsOperations: @@ -60,15 +65,17 @@ class NetworkTapsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO], **kwargs: Any - ) -> _models.NetworkTap: - error_map = { + self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -81,7 +88,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -91,7 +98,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkTap") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -99,40 +106,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkTap", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } - @overload async def begin_create( self, @@ -157,14 +162,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -176,7 +173,7 @@ async def begin_create( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -191,18 +188,10 @@ async def begin_create( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -211,7 +200,7 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO], **kwargs: Any + self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkTap]: """Create Network Tap. @@ -222,19 +211,8 @@ async def begin_create( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Request payload. Is either a NetworkTap type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkTap type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -261,12 +239,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -279,17 +258,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkTap].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return AsyncLROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: @@ -302,12 +279,11 @@ async def get(self, resource_group_name: str, network_tap_name: str, **kwargs: A :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkTap or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -321,45 +297,46 @@ async def get(self, resource_group_name: str, network_tap_name: str, **kwargs: A api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore async def _update_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTapPatch, IO], **kwargs: Any - ) -> Optional[_models.NetworkTap]: - error_map = { + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -372,7 +349,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkTap]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -382,7 +359,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkTapPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -390,41 +367,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTap", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -450,14 +427,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -469,7 +438,7 @@ async def begin_update( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -484,18 +453,10 @@ async def begin_update( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Network Tap properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -504,7 +465,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTapPatch, IO], **kwargs: Any + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.NetworkTap]: """Updates the Network Taps. @@ -515,20 +480,9 @@ async def begin_update( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -555,12 +509,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -572,22 +527,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkTap].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return AsyncLROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -599,38 +552,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -645,14 +604,6 @@ async def begin_delete( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -666,7 +617,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_tap_name=network_tap_name, api_version=api_version, @@ -675,11 +626,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -690,20 +642,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.NetworkTap"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: """List Network Taps by resource group. Displays Network Taps list by resource group GET method. @@ -711,7 +659,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTap or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -723,7 +670,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -734,16 +681,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -755,13 +700,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) @@ -771,34 +715,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkTap"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: """List Network Taps by subscription. Displays Network Taps list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTap or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] @@ -810,7 +752,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkT api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,15 +763,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.NetworkT def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -841,13 +781,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) @@ -857,35 +796,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps" - } - async def _update_administrative_state_initial( self, resource_group_name: str, network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -898,7 +836,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -908,7 +846,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -916,43 +854,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -977,14 +914,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -997,7 +926,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1012,18 +941,10 @@ async def begin_update_administrative_state( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1036,7 +957,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Updates administrative state of Network Tap. @@ -1048,20 +969,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1089,12 +999,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1106,22 +1017,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _resync_initial( self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,50 +1042,49 @@ async def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync" - } - @distributed_trace_async async def begin_resync( self, resource_group_name: str, network_tap_name: str, **kwargs: Any @@ -1190,14 +1098,6 @@ async def begin_resync( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1222,12 +1122,13 @@ async def begin_resync( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1239,14 +1140,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py index ea1d068786e2..39030e97d851 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_to_network_interconnects_operations import ( build_create_request, build_delete_request, @@ -40,9 +43,11 @@ build_update_npb_static_route_bfd_administrative_state_request, build_update_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class NetworkToNetworkInterconnectsOperations: @@ -59,20 +64,22 @@ class NetworkToNetworkInterconnectsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO], + body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], **kwargs: Any - ) -> _models.NetworkToNetworkInterconnect: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -85,7 +92,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -95,7 +102,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "NetworkToNetworkInterconnect") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -104,40 +111,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } - @overload async def begin_create( self, @@ -166,14 +171,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -187,7 +184,7 @@ async def begin_create( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -205,18 +202,10 @@ async def begin_create( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -230,7 +219,7 @@ async def begin_create( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO], + body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: """Configuration used to setup CE-PE connectivity. @@ -245,20 +234,9 @@ async def begin_create( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -287,12 +265,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -305,17 +284,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get( @@ -337,12 +314,11 @@ async def get( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkToNetworkInterconnect or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -356,51 +332,48 @@ async def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore async def _update_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO], + body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkToNetworkInterconnect]: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,7 +386,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkToNetworkInterconnect]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -423,7 +396,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "NetworkToNetworkInterconnectPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -432,41 +405,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -496,14 +469,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -517,7 +482,7 @@ async def begin_update( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -535,18 +500,10 @@ async def begin_update( Required. :type network_to_network_interconnect_name: str :param body: Network to Network Interconnect properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -560,7 +517,7 @@ async def begin_update( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO], + body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: """Updates a Network To NetworkInterconnects. @@ -576,19 +533,9 @@ async def begin_update( Required. :type network_to_network_interconnect_name: str :param body: Network to Network Interconnect properties to update. Is either a - NetworkToNetworkInterconnectPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkToNetworkInterconnectPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or + IO[bytes] :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -617,12 +564,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -634,26 +582,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -665,39 +611,45 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -719,14 +671,6 @@ async def begin_delete( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -740,7 +684,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -750,11 +694,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -765,22 +710,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_network_fabric( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkToNetworkInterconnect"]: + ) -> AsyncItemPaged["_models.NetworkToNetworkInterconnect"]: """Executes list operation to display Network To Network Interconnects within a Network Fabric. Implements Network To Network Interconnects list by Network Fabric GET method. @@ -790,7 +731,6 @@ def list_by_network_fabric( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -803,7 +743,7 @@ def list_by_network_fabric( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkToNetworkInterconnectsList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,17 +754,15 @@ def list_by_network_fabric( def prepare_request(next_link=None): if not next_link: - request = build_list_by_network_fabric_request( + _request = build_list_by_network_fabric_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_network_fabric.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -836,13 +774,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("NetworkToNetworkInterconnectsList", pipeline_response) @@ -852,36 +789,35 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_network_fabric.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects" - } - - async def _update_npb_static_route_bfd_administrative_state_initial( + async def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -894,7 +830,7 @@ async def _update_npb_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -904,7 +840,7 @@ async def _update_npb_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_npb_static_route_bfd_administrative_state_request( + _request = build_update_npb_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -913,45 +849,44 @@ async def _update_npb_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_npb_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_npb_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState" - } - @overload - async def begin_update_npb_static_route_bfd_administrative_state( + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -978,14 +913,6 @@ async def begin_update_npb_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -994,12 +921,12 @@ async def begin_update_npb_static_route_bfd_administrative_state( """ @overload - async def begin_update_npb_static_route_bfd_administrative_state( + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1017,18 +944,10 @@ async def begin_update_npb_static_route_bfd_administrative_state( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1037,12 +956,12 @@ async def begin_update_npb_static_route_bfd_administrative_state( """ @distributed_trace_async - async def begin_update_npb_static_route_bfd_administrative_state( + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1057,20 +976,9 @@ async def begin_update_npb_static_route_bfd_administrative_state( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1099,12 +1007,13 @@ async def begin_update_npb_static_route_bfd_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1116,27 +1025,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_npb_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _update_administrative_state_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1149,7 +1056,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1159,7 +1066,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -1168,43 +1075,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -1233,14 +1139,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1254,7 +1152,7 @@ async def begin_update_administrative_state( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1272,18 +1170,10 @@ async def begin_update_administrative_state( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1297,7 +1187,7 @@ async def begin_update_administrative_state( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1312,20 +1202,9 @@ async def begin_update_administrative_state( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1354,12 +1233,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1371,14 +1251,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py index 2f4663861df8..2defbcbb22e5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -19,18 +20,19 @@ map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class Operations: @@ -47,16 +49,17 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: """Returns list of all operations. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Operation or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.Operation] @@ -68,7 +71,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -79,14 +82,12 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -98,13 +99,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("OperationListResult", pipeline_response) @@ -114,21 +114,22 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - - list.metadata = {"url": "/providers/Microsoft.ManagedNetworkFabric/operations"} diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py index 1279db28c3d3..c2a2d3f844eb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -17,12 +19,13 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict @@ -30,7 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._vendor import _convert_request +from ..._utils.serialization import Deserializer, Serializer from ...operations._route_policies_operations import ( build_commit_configuration_request, build_create_request, @@ -42,9 +45,11 @@ build_update_request, build_validate_configuration_request, ) +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class RoutePoliciesOperations: @@ -61,15 +66,21 @@ class RoutePoliciesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_initial( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicy, IO], **kwargs: Any - ) -> _models.RoutePolicy: - error_map = { + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -82,7 +93,7 @@ async def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -92,7 +103,7 @@ async def _create_initial( else: _json = self._serialize.body(body, "RoutePolicy") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -100,40 +111,38 @@ async def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("RoutePolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } - @overload async def begin_create( self, @@ -158,14 +167,6 @@ async def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -177,7 +178,7 @@ async def begin_create( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -192,18 +193,10 @@ async def begin_create( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -212,7 +205,11 @@ async def begin_create( @distributed_trace_async async def begin_create( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicy, IO], **kwargs: Any + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.RoutePolicy]: """Create Route Policy. @@ -223,19 +220,8 @@ async def begin_create( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Request payload. Is either a RoutePolicy type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a RoutePolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO[bytes] :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -262,12 +248,13 @@ async def begin_create( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -280,17 +267,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return AsyncLROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace_async async def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: @@ -303,12 +288,11 @@ async def get(self, resource_group_name: str, route_policy_name: str, **kwargs: :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: RoutePolicy or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,45 +306,46 @@ async def get(self, resource_group_name: str, route_policy_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore async def _update_initial( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicyPatch, IO], **kwargs: Any - ) -> Optional[_models.RoutePolicy]: - error_map = { + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -373,7 +358,7 @@ async def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.RoutePolicy]] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -383,7 +368,7 @@ async def _update_initial( else: _json = self._serialize.body(body, "RoutePolicyPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -391,41 +376,41 @@ async def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("RoutePolicy", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore @overload async def begin_update( @@ -451,14 +436,6 @@ async def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -470,7 +447,7 @@ async def begin_update( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -485,18 +462,10 @@ async def begin_update( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Route Policy properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -505,7 +474,11 @@ async def begin_update( @distributed_trace_async async def begin_update( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicyPatch, IO], **kwargs: Any + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, IO[bytes]], + **kwargs: Any ) -> AsyncLROPoller[_models.RoutePolicy]: """Updates a Route Policy. @@ -516,20 +489,9 @@ async def begin_update( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO[bytes] :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -556,12 +518,13 @@ async def begin_update( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -573,22 +536,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return AsyncLROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -600,38 +561,44 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore @distributed_trace_async async def begin_delete( @@ -646,14 +613,6 @@ async def begin_delete( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -667,7 +626,7 @@ async def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( # type: ignore + raw_result = await self._delete_initial( resource_group_name=resource_group_name, route_policy_name=route_policy_name, api_version=api_version, @@ -676,11 +635,12 @@ async def begin_delete( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -691,20 +651,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.RoutePolicy"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: """List RoutePolicies by resource group. Implements RoutePolicies list by resource group GET method. @@ -712,7 +668,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RoutePolicy or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -724,7 +679,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,16 +690,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -756,13 +709,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) @@ -772,34 +724,32 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.RoutePolicy"]: + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: """List RoutePolicies by subscription. Implements RoutePolicies list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RoutePolicy or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -811,7 +761,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.RoutePol api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -822,15 +772,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.RoutePol def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -842,13 +790,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request async def extract_data(pipeline_response): deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) @@ -858,35 +805,34 @@ async def extract_data(pipeline_response): return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - } - async def _update_administrative_state_initial( self, resource_group_name: str, route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -899,7 +845,7 @@ async def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -909,7 +855,7 @@ async def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -917,43 +863,42 @@ async def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState" - } - @overload async def begin_update_administrative_state( self, @@ -978,14 +923,6 @@ async def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -998,7 +935,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1013,18 +950,10 @@ async def begin_update_administrative_state( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1037,7 +966,7 @@ async def begin_update_administrative_state( self, resource_group_name: str, route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Executes enable operation to the underlying resources. @@ -1049,20 +978,9 @@ async def begin_update_administrative_state( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1090,12 +1008,13 @@ async def begin_update_administrative_state( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1107,22 +1026,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState" - } + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _validate_configuration_initial( self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1134,50 +1051,49 @@ async def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration" - } - @distributed_trace_async async def begin_validate_configuration( self, resource_group_name: str, route_policy_name: str, **kwargs: Any @@ -1189,14 +1105,6 @@ async def begin_validate_configuration( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1221,12 +1129,13 @@ async def begin_validate_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1238,22 +1147,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration" - } + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _commit_configuration_initial( self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1265,50 +1172,49 @@ async def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration" - } - @distributed_trace_async async def begin_commit_configuration( self, resource_group_name: str, route_policy_name: str, **kwargs: Any @@ -1322,14 +1228,6 @@ async def begin_commit_configuration( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for - this operation to not poll, or pass in your own initialized polling object for a personal - polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1354,12 +1252,13 @@ async def begin_commit_configuration( params=_params, **kwargs ) + await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1371,14 +1270,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller.from_continuation_token( + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration" - } + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py index b0f438aaf4e0..4ded9635ba38 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py @@ -5,273 +5,286 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AccessControlList -from ._models_py3 import AccessControlListAction -from ._models_py3 import AccessControlListMatchCondition -from ._models_py3 import AccessControlListMatchConfiguration -from ._models_py3 import AccessControlListPatch -from ._models_py3 import AccessControlListPatchProperties -from ._models_py3 import AccessControlListPatchableProperties -from ._models_py3 import AccessControlListPortCondition -from ._models_py3 import AccessControlListProperties -from ._models_py3 import AccessControlListsListResult -from ._models_py3 import ActionIpCommunityProperties -from ._models_py3 import ActionIpExtendedCommunityProperties -from ._models_py3 import AggregateRoute -from ._models_py3 import AggregateRouteConfiguration -from ._models_py3 import AnnotationResource -from ._models_py3 import BfdConfiguration -from ._models_py3 import BgpConfiguration -from ._models_py3 import CommonDynamicMatchConfiguration -from ._models_py3 import CommonMatchConditions -from ._models_py3 import CommonPostActionResponseForDeviceUpdate -from ._models_py3 import CommonPostActionResponseForStateUpdate -from ._models_py3 import ConnectedSubnet -from ._models_py3 import ConnectedSubnetRoutePolicy -from ._models_py3 import ControllerServices -from ._models_py3 import DestinationProperties -from ._models_py3 import DeviceInterfaceProperties -from ._models_py3 import EnableDisableOnResources -from ._models_py3 import ErrorAdditionalInfo -from ._models_py3 import ErrorDetail -from ._models_py3 import ErrorResponse -from ._models_py3 import ExportRoutePolicy -from ._models_py3 import ExportRoutePolicyInformation -from ._models_py3 import ExpressRouteConnectionInformation -from ._models_py3 import ExtendedLocation -from ._models_py3 import ExtensionEnumProperty -from ._models_py3 import ExternalNetwork -from ._models_py3 import ExternalNetworkPatch -from ._models_py3 import ExternalNetworkPatchProperties -from ._models_py3 import ExternalNetworkPatchPropertiesOptionAProperties -from ._models_py3 import ExternalNetworkPatchableProperties -from ._models_py3 import ExternalNetworkProperties -from ._models_py3 import ExternalNetworkPropertiesOptionAProperties -from ._models_py3 import ExternalNetworksList -from ._models_py3 import ImportRoutePolicy -from ._models_py3 import ImportRoutePolicyInformation -from ._models_py3 import InternalNetwork -from ._models_py3 import InternalNetworkPatch -from ._models_py3 import InternalNetworkPatchProperties -from ._models_py3 import InternalNetworkPatchableProperties -from ._models_py3 import InternalNetworkProperties -from ._models_py3 import InternalNetworkPropertiesBgpConfiguration -from ._models_py3 import InternalNetworkPropertiesStaticRouteConfiguration -from ._models_py3 import InternalNetworksList -from ._models_py3 import InternetGateway -from ._models_py3 import InternetGatewayPatch -from ._models_py3 import InternetGatewayPatchableProperties -from ._models_py3 import InternetGatewayProperties -from ._models_py3 import InternetGatewayRule -from ._models_py3 import InternetGatewayRulePatch -from ._models_py3 import InternetGatewayRuleProperties -from ._models_py3 import InternetGatewayRulesListResult -from ._models_py3 import InternetGatewaysListResult -from ._models_py3 import IpCommunitiesListResult -from ._models_py3 import IpCommunity -from ._models_py3 import IpCommunityAddOperationProperties -from ._models_py3 import IpCommunityDeleteOperationProperties -from ._models_py3 import IpCommunityIdList -from ._models_py3 import IpCommunityPatch -from ._models_py3 import IpCommunityPatchableProperties -from ._models_py3 import IpCommunityProperties -from ._models_py3 import IpCommunityRule -from ._models_py3 import IpCommunitySetOperationProperties -from ._models_py3 import IpExtendedCommunity -from ._models_py3 import IpExtendedCommunityAddOperationProperties -from ._models_py3 import IpExtendedCommunityDeleteOperationProperties -from ._models_py3 import IpExtendedCommunityIdList -from ._models_py3 import IpExtendedCommunityListResult -from ._models_py3 import IpExtendedCommunityPatch -from ._models_py3 import IpExtendedCommunityPatchProperties -from ._models_py3 import IpExtendedCommunityPatchableProperties -from ._models_py3 import IpExtendedCommunityProperties -from ._models_py3 import IpExtendedCommunityRule -from ._models_py3 import IpExtendedCommunitySetOperationProperties -from ._models_py3 import IpGroupProperties -from ._models_py3 import IpMatchCondition -from ._models_py3 import IpPrefix -from ._models_py3 import IpPrefixPatch -from ._models_py3 import IpPrefixPatchProperties -from ._models_py3 import IpPrefixPatchableProperties -from ._models_py3 import IpPrefixProperties -from ._models_py3 import IpPrefixRule -from ._models_py3 import IpPrefixesListResult -from ._models_py3 import IsolationDomainProperties -from ._models_py3 import L2IsolationDomain -from ._models_py3 import L2IsolationDomainPatch -from ._models_py3 import L2IsolationDomainPatchProperties -from ._models_py3 import L2IsolationDomainProperties -from ._models_py3 import L2IsolationDomainsListResult -from ._models_py3 import L3ExportRoutePolicy -from ._models_py3 import L3IsolationDomain -from ._models_py3 import L3IsolationDomainPatch -from ._models_py3 import L3IsolationDomainPatchProperties -from ._models_py3 import L3IsolationDomainPatchableProperties -from ._models_py3 import L3IsolationDomainProperties -from ._models_py3 import L3IsolationDomainsListResult -from ._models_py3 import L3OptionAProperties -from ._models_py3 import L3OptionBProperties -from ._models_py3 import Layer2Configuration -from ._models_py3 import Layer3IpPrefixProperties -from ._models_py3 import ManagedResourceGroupConfiguration -from ._models_py3 import ManagementNetworkConfigurationPatchableProperties -from ._models_py3 import ManagementNetworkConfigurationProperties -from ._models_py3 import NeighborAddress -from ._models_py3 import NeighborGroup -from ._models_py3 import NeighborGroupDestination -from ._models_py3 import NeighborGroupPatch -from ._models_py3 import NeighborGroupPatchProperties -from ._models_py3 import NeighborGroupPatchableProperties -from ._models_py3 import NeighborGroupProperties -from ._models_py3 import NeighborGroupsListResult -from ._models_py3 import NetworkDevice -from ._models_py3 import NetworkDevicePatchParameters -from ._models_py3 import NetworkDevicePatchParametersProperties -from ._models_py3 import NetworkDevicePatchableProperties -from ._models_py3 import NetworkDeviceProperties -from ._models_py3 import NetworkDeviceSku -from ._models_py3 import NetworkDeviceSkusListResult -from ._models_py3 import NetworkDevicesListResult -from ._models_py3 import NetworkFabric -from ._models_py3 import NetworkFabricController -from ._models_py3 import NetworkFabricControllerPatch -from ._models_py3 import NetworkFabricControllerPatchableProperties -from ._models_py3 import NetworkFabricControllerProperties -from ._models_py3 import NetworkFabricControllersListResult -from ._models_py3 import NetworkFabricPatch -from ._models_py3 import NetworkFabricPatchProperties -from ._models_py3 import NetworkFabricPatchableProperties -from ._models_py3 import NetworkFabricPatchablePropertiesTerminalServerConfiguration -from ._models_py3 import NetworkFabricProperties -from ._models_py3 import NetworkFabricSku -from ._models_py3 import NetworkFabricSkusListResult -from ._models_py3 import NetworkFabricsListResult -from ._models_py3 import NetworkInterface -from ._models_py3 import NetworkInterfacePatch -from ._models_py3 import NetworkInterfacePatchProperties -from ._models_py3 import NetworkInterfaceProperties -from ._models_py3 import NetworkInterfacesList -from ._models_py3 import NetworkPacketBroker -from ._models_py3 import NetworkPacketBrokerPatch -from ._models_py3 import NetworkPacketBrokersListResult -from ._models_py3 import NetworkRack -from ._models_py3 import NetworkRackProperties -from ._models_py3 import NetworkRacksListResult -from ._models_py3 import NetworkTap -from ._models_py3 import NetworkTapPatch -from ._models_py3 import NetworkTapPatchableParameters -from ._models_py3 import NetworkTapPatchableParametersDestinationsItem -from ._models_py3 import NetworkTapProperties -from ._models_py3 import NetworkTapPropertiesDestinationsItem -from ._models_py3 import NetworkTapRule -from ._models_py3 import NetworkTapRuleAction -from ._models_py3 import NetworkTapRuleMatchCondition -from ._models_py3 import NetworkTapRuleMatchConfiguration -from ._models_py3 import NetworkTapRulePatch -from ._models_py3 import NetworkTapRulePatchProperties -from ._models_py3 import NetworkTapRulePatchableProperties -from ._models_py3 import NetworkTapRuleProperties -from ._models_py3 import NetworkTapRulesListResult -from ._models_py3 import NetworkTapsListResult -from ._models_py3 import NetworkToNetworkInterconnect -from ._models_py3 import NetworkToNetworkInterconnectPatch -from ._models_py3 import NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration -from ._models_py3 import NetworkToNetworkInterconnectsList -from ._models_py3 import NpbStaticRouteConfiguration -from ._models_py3 import Operation -from ._models_py3 import OperationDisplay -from ._models_py3 import OperationListResult -from ._models_py3 import OptionAProperties -from ._models_py3 import OptionBLayer3Configuration -from ._models_py3 import OptionBProperties -from ._models_py3 import PortCondition -from ._models_py3 import PortGroupProperties -from ._models_py3 import ProxyResource -from ._models_py3 import RebootProperties -from ._models_py3 import Resource -from ._models_py3 import RoutePoliciesListResult -from ._models_py3 import RoutePolicy -from ._models_py3 import RoutePolicyPatch -from ._models_py3 import RoutePolicyPatchableProperties -from ._models_py3 import RoutePolicyProperties -from ._models_py3 import RoutePolicyStatementProperties -from ._models_py3 import RouteTargetInformation -from ._models_py3 import RuleProperties -from ._models_py3 import StatementActionProperties -from ._models_py3 import StatementConditionProperties -from ._models_py3 import StaticRouteConfiguration -from ._models_py3 import StaticRouteProperties -from ._models_py3 import SupportedConnectorProperties -from ._models_py3 import SupportedVersionProperties -from ._models_py3 import SystemData -from ._models_py3 import TagsUpdate -from ._models_py3 import TerminalServerConfiguration -from ._models_py3 import TerminalServerPatchableProperties -from ._models_py3 import TrackedResource -from ._models_py3 import UpdateAdministrativeState -from ._models_py3 import UpdateDeviceAdministrativeState -from ._models_py3 import UpdateVersion -from ._models_py3 import ValidateConfigurationProperties -from ._models_py3 import ValidateConfigurationResponse -from ._models_py3 import VlanGroupProperties -from ._models_py3 import VlanMatchCondition -from ._models_py3 import VpnConfigurationPatchableProperties -from ._models_py3 import VpnConfigurationPatchablePropertiesOptionAProperties -from ._models_py3 import VpnConfigurationProperties -from ._models_py3 import VpnConfigurationPropertiesOptionAProperties +from typing import TYPE_CHECKING -from ._managed_network_fabric_mgmt_client_enums import AclActionType -from ._managed_network_fabric_mgmt_client_enums import Action -from ._managed_network_fabric_mgmt_client_enums import ActionType -from ._managed_network_fabric_mgmt_client_enums import AddressFamilyType -from ._managed_network_fabric_mgmt_client_enums import AdministrativeState -from ._managed_network_fabric_mgmt_client_enums import AllowASOverride -from ._managed_network_fabric_mgmt_client_enums import BfdAdministrativeState -from ._managed_network_fabric_mgmt_client_enums import BooleanEnumProperty -from ._managed_network_fabric_mgmt_client_enums import CommunityActionTypes -from ._managed_network_fabric_mgmt_client_enums import Condition -from ._managed_network_fabric_mgmt_client_enums import ConfigurationState -from ._managed_network_fabric_mgmt_client_enums import ConfigurationType -from ._managed_network_fabric_mgmt_client_enums import CreatedByType -from ._managed_network_fabric_mgmt_client_enums import DestinationType -from ._managed_network_fabric_mgmt_client_enums import DeviceAdministrativeState -from ._managed_network_fabric_mgmt_client_enums import EnableDisableState -from ._managed_network_fabric_mgmt_client_enums import Encapsulation -from ._managed_network_fabric_mgmt_client_enums import EncapsulationType -from ._managed_network_fabric_mgmt_client_enums import Extension -from ._managed_network_fabric_mgmt_client_enums import FabricSkuType -from ._managed_network_fabric_mgmt_client_enums import GatewayType -from ._managed_network_fabric_mgmt_client_enums import IPAddressType -from ._managed_network_fabric_mgmt_client_enums import InterfaceType -from ._managed_network_fabric_mgmt_client_enums import IsManagementType -from ._managed_network_fabric_mgmt_client_enums import IsMonitoringEnabled -from ._managed_network_fabric_mgmt_client_enums import IsWorkloadManagementNetworkEnabled -from ._managed_network_fabric_mgmt_client_enums import Layer4Protocol -from ._managed_network_fabric_mgmt_client_enums import NetworkDeviceRole -from ._managed_network_fabric_mgmt_client_enums import NetworkDeviceRoleName -from ._managed_network_fabric_mgmt_client_enums import NetworkRackType -from ._managed_network_fabric_mgmt_client_enums import NfcSku -from ._managed_network_fabric_mgmt_client_enums import NniType -from ._managed_network_fabric_mgmt_client_enums import Origin -from ._managed_network_fabric_mgmt_client_enums import PeeringOption -from ._managed_network_fabric_mgmt_client_enums import PollingIntervalInSeconds -from ._managed_network_fabric_mgmt_client_enums import PollingType -from ._managed_network_fabric_mgmt_client_enums import PortType -from ._managed_network_fabric_mgmt_client_enums import PrefixType -from ._managed_network_fabric_mgmt_client_enums import ProvisioningState -from ._managed_network_fabric_mgmt_client_enums import RebootType -from ._managed_network_fabric_mgmt_client_enums import RedistributeConnectedSubnets -from ._managed_network_fabric_mgmt_client_enums import RedistributeStaticRoutes -from ._managed_network_fabric_mgmt_client_enums import RoutePolicyActionType -from ._managed_network_fabric_mgmt_client_enums import RoutePolicyConditionType -from ._managed_network_fabric_mgmt_client_enums import SourceDestinationType -from ._managed_network_fabric_mgmt_client_enums import TapRuleActionType -from ._managed_network_fabric_mgmt_client_enums import ValidateAction -from ._managed_network_fabric_mgmt_client_enums import WellKnownCommunities +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AccessControlList, + AccessControlListAction, + AccessControlListMatchCondition, + AccessControlListMatchConfiguration, + AccessControlListPatch, + AccessControlListPatchProperties, + AccessControlListPatchableProperties, + AccessControlListPortCondition, + AccessControlListProperties, + AccessControlListsListResult, + ActionIpCommunityProperties, + ActionIpExtendedCommunityProperties, + AggregateRoute, + AggregateRouteConfiguration, + AnnotationResource, + BfdConfiguration, + BgpConfiguration, + CommonDynamicMatchConfiguration, + CommonMatchConditions, + CommonPostActionResponseForDeviceUpdate, + CommonPostActionResponseForStateUpdate, + ConnectedSubnet, + ConnectedSubnetRoutePolicy, + ControllerServices, + DestinationProperties, + DeviceInterfaceProperties, + EnableDisableOnResources, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + ExportRoutePolicy, + ExportRoutePolicyInformation, + ExpressRouteConnectionInformation, + ExtendedLocation, + ExtensionEnumProperty, + ExternalNetwork, + ExternalNetworkPatch, + ExternalNetworkPatchProperties, + ExternalNetworkPatchPropertiesOptionAProperties, + ExternalNetworkPatchableProperties, + ExternalNetworkProperties, + ExternalNetworkPropertiesOptionAProperties, + ExternalNetworksList, + ImportRoutePolicy, + ImportRoutePolicyInformation, + InternalNetwork, + InternalNetworkPatch, + InternalNetworkPatchProperties, + InternalNetworkPatchableProperties, + InternalNetworkProperties, + InternalNetworkPropertiesBgpConfiguration, + InternalNetworkPropertiesStaticRouteConfiguration, + InternalNetworksList, + InternetGateway, + InternetGatewayPatch, + InternetGatewayPatchableProperties, + InternetGatewayProperties, + InternetGatewayRule, + InternetGatewayRulePatch, + InternetGatewayRuleProperties, + InternetGatewayRulesListResult, + InternetGatewaysListResult, + IpCommunitiesListResult, + IpCommunity, + IpCommunityAddOperationProperties, + IpCommunityDeleteOperationProperties, + IpCommunityIdList, + IpCommunityPatch, + IpCommunityPatchableProperties, + IpCommunityProperties, + IpCommunityRule, + IpCommunitySetOperationProperties, + IpExtendedCommunity, + IpExtendedCommunityAddOperationProperties, + IpExtendedCommunityDeleteOperationProperties, + IpExtendedCommunityIdList, + IpExtendedCommunityListResult, + IpExtendedCommunityPatch, + IpExtendedCommunityPatchProperties, + IpExtendedCommunityPatchableProperties, + IpExtendedCommunityProperties, + IpExtendedCommunityRule, + IpExtendedCommunitySetOperationProperties, + IpGroupProperties, + IpMatchCondition, + IpPrefix, + IpPrefixPatch, + IpPrefixPatchProperties, + IpPrefixPatchableProperties, + IpPrefixProperties, + IpPrefixRule, + IpPrefixesListResult, + IsolationDomainProperties, + L2IsolationDomain, + L2IsolationDomainPatch, + L2IsolationDomainPatchProperties, + L2IsolationDomainProperties, + L2IsolationDomainsListResult, + L3ExportRoutePolicy, + L3IsolationDomain, + L3IsolationDomainPatch, + L3IsolationDomainPatchProperties, + L3IsolationDomainPatchableProperties, + L3IsolationDomainProperties, + L3IsolationDomainsListResult, + L3OptionAProperties, + L3OptionBProperties, + Layer2Configuration, + Layer3IpPrefixProperties, + ManagedResourceGroupConfiguration, + ManagementNetworkConfigurationPatchableProperties, + ManagementNetworkConfigurationProperties, + NeighborAddress, + NeighborGroup, + NeighborGroupDestination, + NeighborGroupPatch, + NeighborGroupPatchProperties, + NeighborGroupPatchableProperties, + NeighborGroupProperties, + NeighborGroupsListResult, + NetworkDevice, + NetworkDevicePatchParameters, + NetworkDevicePatchParametersProperties, + NetworkDevicePatchableProperties, + NetworkDeviceProperties, + NetworkDeviceSku, + NetworkDeviceSkusListResult, + NetworkDevicesListResult, + NetworkFabric, + NetworkFabricController, + NetworkFabricControllerPatch, + NetworkFabricControllerPatchableProperties, + NetworkFabricControllerProperties, + NetworkFabricControllersListResult, + NetworkFabricPatch, + NetworkFabricPatchProperties, + NetworkFabricPatchableProperties, + NetworkFabricPatchablePropertiesTerminalServerConfiguration, + NetworkFabricProperties, + NetworkFabricSku, + NetworkFabricSkusListResult, + NetworkFabricsListResult, + NetworkInterface, + NetworkInterfacePatch, + NetworkInterfacePatchProperties, + NetworkInterfaceProperties, + NetworkInterfacesList, + NetworkPacketBroker, + NetworkPacketBrokerPatch, + NetworkPacketBrokersListResult, + NetworkRack, + NetworkRackProperties, + NetworkRacksListResult, + NetworkTap, + NetworkTapPatch, + NetworkTapPatchableParameters, + NetworkTapPatchableParametersDestinationsItem, + NetworkTapProperties, + NetworkTapPropertiesDestinationsItem, + NetworkTapRule, + NetworkTapRuleAction, + NetworkTapRuleMatchCondition, + NetworkTapRuleMatchConfiguration, + NetworkTapRulePatch, + NetworkTapRulePatchProperties, + NetworkTapRulePatchableProperties, + NetworkTapRuleProperties, + NetworkTapRulesListResult, + NetworkTapsListResult, + NetworkToNetworkInterconnect, + NetworkToNetworkInterconnectPatch, + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration, + NetworkToNetworkInterconnectsList, + NpbStaticRouteConfiguration, + Operation, + OperationDisplay, + OperationListResult, + OptionAProperties, + OptionBLayer3Configuration, + OptionBProperties, + PortCondition, + PortGroupProperties, + ProxyResource, + RebootProperties, + Resource, + RoutePoliciesListResult, + RoutePolicy, + RoutePolicyPatch, + RoutePolicyPatchableProperties, + RoutePolicyProperties, + RoutePolicyStatementProperties, + RouteTargetInformation, + RuleProperties, + StatementActionProperties, + StatementConditionProperties, + StaticRouteConfiguration, + StaticRouteProperties, + SupportedConnectorProperties, + SupportedVersionProperties, + SystemData, + TagsUpdate, + TerminalServerConfiguration, + TerminalServerPatchableProperties, + TrackedResource, + UpdateAdministrativeState, + UpdateDeviceAdministrativeState, + UpdateVersion, + UpgradeNetworkFabricProperties, + ValidateConfigurationProperties, + ValidateConfigurationResponse, + VlanGroupProperties, + VlanMatchCondition, + VpnConfigurationPatchableProperties, + VpnConfigurationPatchablePropertiesOptionAProperties, + VpnConfigurationProperties, + VpnConfigurationPropertiesOptionAProperties, +) + +from ._managed_network_fabric_mgmt_client_enums import ( # type: ignore + AclActionType, + Action, + ActionType, + AddressFamilyType, + AdministrativeState, + AllowASOverride, + BfdAdministrativeState, + BooleanEnumProperty, + CommunityActionTypes, + Condition, + ConfigurationState, + ConfigurationType, + CreatedByType, + DestinationType, + DeviceAdministrativeState, + EnableDisableState, + Encapsulation, + EncapsulationType, + Extension, + FabricSkuType, + GatewayType, + IPAddressType, + InterfaceType, + IsManagementType, + IsMonitoringEnabled, + IsWorkloadManagementNetworkEnabled, + Layer4Protocol, + NetworkDeviceRole, + NetworkDeviceRoleName, + NetworkFabricUpgradeAction, + NetworkRackType, + NfcSku, + NniType, + Origin, + PeeringOption, + PollingIntervalInSeconds, + PollingType, + PortType, + PrefixType, + ProvisioningState, + RebootType, + RedistributeConnectedSubnets, + RedistributeStaticRoutes, + RoutePolicyActionType, + RoutePolicyConditionType, + SourceDestinationType, + TapRuleActionType, + ValidateAction, + WellKnownCommunities, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -482,6 +495,7 @@ "UpdateAdministrativeState", "UpdateDeviceAdministrativeState", "UpdateVersion", + "UpgradeNetworkFabricProperties", "ValidateConfigurationProperties", "ValidateConfigurationResponse", "VlanGroupProperties", @@ -519,6 +533,7 @@ "Layer4Protocol", "NetworkDeviceRole", "NetworkDeviceRoleName", + "NetworkFabricUpgradeAction", "NetworkRackType", "NfcSku", "NniType", @@ -539,5 +554,5 @@ "ValidateAction", "WellKnownCommunities", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py index 4be5782fc50a..2821649178bd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py @@ -99,6 +99,8 @@ class ConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): DEPROVISIONED = "Deprovisioned" ERROR_DEPROVISIONING = "ErrorDeprovisioning" DEFERRED_CONTROL = "DeferredControl" + PROVISIONING = "Provisioning" + PENDING_COMMIT = "PendingCommit" class ConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -148,7 +150,7 @@ class Encapsulation(str, Enum, metaclass=CaseInsensitiveEnumMeta): class EncapsulationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Encapsulation Type.""" + """Encapsulation Type that needs to be matched.""" NONE = "None" GT_PV1 = "GTPv1" @@ -240,6 +242,13 @@ class NetworkDeviceRoleName(str, Enum, metaclass=CaseInsensitiveEnumMeta): MANAGEMENT = "Management" +class NetworkFabricUpgradeAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Action to be performed while upgrading the fabric.""" + + START = "Start" + COMPLETE = "Complete" + + class NetworkRackType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network Rack SKU name.""" @@ -304,7 +313,7 @@ class PortType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PrefixType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IP Prefix Type.""" + """IP Prefix Type that needs to be matched.""" PREFIX = "Prefix" LONGEST_PREFIX = "LongestPrefix" @@ -350,7 +359,6 @@ class RoutePolicyActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): PERMIT = "Permit" DENY = "Deny" CONTINUE = "Continue" - CONTINUE_ENUM = "Continue" class RoutePolicyConditionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -358,12 +366,10 @@ class RoutePolicyConditionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): OR = "Or" AND = "And" - OR_ENUM = "Or" - AND_ENUM = "And" class SourceDestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IP Address type.""" + """IP Address type that needs to be matched.""" SOURCE_IP = "SourceIP" DESTINATION_IP = "DestinationIP" @@ -390,11 +396,10 @@ class ValidateAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): class WellKnownCommunities(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """``Internet`` - Advertise routes to internet community. - ``LocalAS`` - Advertise routes to only localAS peers. - ``NoAdvertise`` - Don't advertise routes to any peer. - ``NoExport`` - Don't export to next AS. - ``GShut`` - Graceful Shutdown (GSHUT) withdraw routes before terminating BGP connection. + """``Internet`` - Advertise routes to internet community. ``LocalAS`` - Advertise routes to only + localAS peers. ``NoAdvertise`` - Don't advertise routes to any peer. ``NoExport`` - Don't + export to next AS. ``GShut`` - Graceful Shutdown (GSHUT) withdraw routes before terminating BGP + connection. """ INTERNET = "Internet" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py index 419cf6c9b052..36acdfe887ee 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py @@ -1,5 +1,5 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -7,14 +7,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union -from .. import _serialization +from .._utils import serialization as _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models +JSON = MutableMapping[str, Any] class Resource(_serialization.Model): @@ -52,10 +53,10 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.system_data = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None class TrackedResource(Resource): @@ -64,7 +65,7 @@ class TrackedResource(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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -100,7 +101,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -112,12 +113,12 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw self.location = location -class AccessControlList(TrackedResource): # pylint: disable=too-many-instance-attributes +class AccessControlList(TrackedResource): """The Access Control List resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -141,6 +142,9 @@ class AccessControlList(TrackedResource): # pylint: disable=too-many-instance-a :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :ivar acls_url: Access Control List file URL. :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar match_configurations: List of match configurations. :vartype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -151,7 +155,7 @@ class AccessControlList(TrackedResource): # pylint: disable=too-many-instance-a :vartype last_synced_time: ~datetime.datetime :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -187,6 +191,7 @@ class AccessControlList(TrackedResource): # pylint: disable=too-many-instance-a "annotation": {"key": "properties.annotation", "type": "str"}, "configuration_type": {"key": "properties.configurationType", "type": "str"}, "acls_url": {"key": "properties.aclsUrl", "type": "str"}, + "default_action": {"key": "properties.defaultAction", "type": "str"}, "match_configurations": { "key": "properties.matchConfigurations", "type": "[AccessControlListMatchConfiguration]", @@ -205,12 +210,13 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, acls_url: Optional[str] = None, - match_configurations: Optional[List["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, **kwargs: Any ) -> None: """ @@ -225,6 +231,9 @@ def __init__( :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :keyword acls_url: Access Control List file URL. :paramtype acls_url: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword match_configurations: List of match configurations. :paramtype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -236,12 +245,13 @@ def __init__( self.annotation = annotation self.configuration_type = configuration_type self.acls_url = acls_url + self.default_action = default_action self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations - self.last_synced_time = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.last_synced_time: Optional[datetime.datetime] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class AccessControlListAction(_serialization.Model): @@ -306,7 +316,7 @@ class CommonMatchConditions(_serialization.Model): def __init__( self, *, - protocol_types: Optional[List[str]] = None, + protocol_types: Optional[list[str]] = None, vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, ip_condition: Optional["_models.IpMatchCondition"] = None, **kwargs: Any @@ -334,15 +344,15 @@ class AccessControlListMatchCondition(CommonMatchConditions): :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition :ivar ip_condition: IP condition that needs to be matched. :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :ivar ether_types: List of ether type values that needs to be matched. + :ivar ether_types: List of ether type values that need to be matched. :vartype ether_types: list[str] - :ivar fragments: List of IP fragment packets that needs to be matched. + :ivar fragments: List of IP fragment packets that need to be matched. :vartype fragments: list[str] - :ivar ip_lengths: List of IP Lengths that needs to be matched. + :ivar ip_lengths: List of IP Lengths that need to be matched. :vartype ip_lengths: list[str] - :ivar ttl_values: List of TTL [Time To Live] values that needs to be matched. + :ivar ttl_values: List of TTL [Time To Live] values that need to be matched. :vartype ttl_values: list[str] - :ivar dscp_markings: List of DSCP Markings that needs to be matched. + :ivar dscp_markings: List of DSCP Markings that need to be matched. :vartype dscp_markings: list[str] :ivar port_condition: Defines the port condition that needs to be matched. :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition @@ -372,14 +382,14 @@ class AccessControlListMatchCondition(CommonMatchConditions): def __init__( self, *, - protocol_types: Optional[List[str]] = None, + protocol_types: Optional[list[str]] = None, vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, ip_condition: Optional["_models.IpMatchCondition"] = None, - ether_types: Optional[List[str]] = None, - fragments: Optional[List[str]] = None, - ip_lengths: Optional[List[str]] = None, - ttl_values: Optional[List[str]] = None, - dscp_markings: Optional[List[str]] = None, + ether_types: Optional[list[str]] = None, + fragments: Optional[list[str]] = None, + ip_lengths: Optional[list[str]] = None, + ttl_values: Optional[list[str]] = None, + dscp_markings: Optional[list[str]] = None, port_condition: Optional["_models.AccessControlListPortCondition"] = None, **kwargs: Any ) -> None: @@ -390,15 +400,15 @@ def __init__( :paramtype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition :keyword ip_condition: IP condition that needs to be matched. :paramtype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :keyword ether_types: List of ether type values that needs to be matched. + :keyword ether_types: List of ether type values that need to be matched. :paramtype ether_types: list[str] - :keyword fragments: List of IP fragment packets that needs to be matched. + :keyword fragments: List of IP fragment packets that need to be matched. :paramtype fragments: list[str] - :keyword ip_lengths: List of IP Lengths that needs to be matched. + :keyword ip_lengths: List of IP Lengths that need to be matched. :paramtype ip_lengths: list[str] - :keyword ttl_values: List of TTL [Time To Live] values that needs to be matched. + :keyword ttl_values: List of TTL [Time To Live] values that need to be matched. :paramtype ttl_values: list[str] - :keyword dscp_markings: List of DSCP Markings that needs to be matched. + :keyword dscp_markings: List of DSCP Markings that need to be matched. :paramtype dscp_markings: list[str] :keyword port_condition: Defines the port condition that needs to be matched. :paramtype port_condition: @@ -455,8 +465,8 @@ def __init__( match_configuration_name: Optional[str] = None, sequence_number: Optional[int] = None, ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - match_conditions: Optional[List["_models.AccessControlListMatchCondition"]] = None, - actions: Optional[List["_models.AccessControlListAction"]] = None, + match_conditions: Optional[list["_models.AccessControlListMatchCondition"]] = None, + actions: Optional[list["_models.AccessControlListAction"]] = None, **kwargs: Any ) -> None: """ @@ -492,7 +502,7 @@ class TagsUpdate(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -511,6 +521,9 @@ class AccessControlListPatch(TagsUpdate): :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :ivar acls_url: Access Control List file URL. :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar match_configurations: List of match configurations. :vartype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -531,6 +544,7 @@ class AccessControlListPatch(TagsUpdate): "tags": {"key": "tags", "type": "{str}"}, "configuration_type": {"key": "properties.configurationType", "type": "str"}, "acls_url": {"key": "properties.aclsUrl", "type": "str"}, + "default_action": {"key": "properties.defaultAction", "type": "str"}, "match_configurations": { "key": "properties.matchConfigurations", "type": "[AccessControlListMatchConfiguration]", @@ -545,11 +559,12 @@ class AccessControlListPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, acls_url: Optional[str] = None, - match_configurations: Optional[List["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -561,6 +576,9 @@ def __init__( :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :keyword acls_url: Access Control List file URL. :paramtype acls_url: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword match_configurations: List of match configurations. :paramtype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -573,6 +591,7 @@ def __init__( super().__init__(tags=tags, **kwargs) self.configuration_type = configuration_type self.acls_url = acls_url + self.default_action = default_action self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations self.annotation = annotation @@ -586,6 +605,9 @@ class AccessControlListPatchableProperties(_serialization.Model): :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :ivar acls_url: Access Control List file URL. :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar match_configurations: List of match configurations. :vartype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -603,6 +625,7 @@ class AccessControlListPatchableProperties(_serialization.Model): _attribute_map = { "configuration_type": {"key": "configurationType", "type": "str"}, "acls_url": {"key": "aclsUrl", "type": "str"}, + "default_action": {"key": "defaultAction", "type": "str"}, "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, "dynamic_match_configurations": { "key": "dynamicMatchConfigurations", @@ -615,8 +638,9 @@ def __init__( *, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, acls_url: Optional[str] = None, - match_configurations: Optional[List["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, **kwargs: Any ) -> None: """ @@ -625,6 +649,9 @@ def __init__( :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :keyword acls_url: Access Control List file URL. :paramtype acls_url: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword match_configurations: List of match configurations. :paramtype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -635,6 +662,7 @@ def __init__( super().__init__(**kwargs) self.configuration_type = configuration_type self.acls_url = acls_url + self.default_action = default_action self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations @@ -669,6 +697,9 @@ class AccessControlListPatchProperties(AccessControlListPatchableProperties, Ann :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :ivar acls_url: Access Control List file URL. :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar match_configurations: List of match configurations. :vartype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -687,6 +718,7 @@ class AccessControlListPatchProperties(AccessControlListPatchableProperties, Ann "annotation": {"key": "annotation", "type": "str"}, "configuration_type": {"key": "configurationType", "type": "str"}, "acls_url": {"key": "aclsUrl", "type": "str"}, + "default_action": {"key": "defaultAction", "type": "str"}, "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, "dynamic_match_configurations": { "key": "dynamicMatchConfigurations", @@ -700,8 +732,9 @@ def __init__( annotation: Optional[str] = None, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, acls_url: Optional[str] = None, - match_configurations: Optional[List["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, **kwargs: Any ) -> None: """ @@ -712,6 +745,9 @@ def __init__( :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :keyword acls_url: Access Control List file URL. :paramtype acls_url: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword match_configurations: List of match configurations. :paramtype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -722,6 +758,7 @@ def __init__( super().__init__( configuration_type=configuration_type, acls_url=acls_url, + default_action=default_action, match_configurations=match_configurations, dynamic_match_configurations=dynamic_match_configurations, annotation=annotation, @@ -730,6 +767,7 @@ def __init__( self.annotation = annotation self.configuration_type = configuration_type self.acls_url = acls_url + self.default_action = default_action self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations @@ -737,7 +775,7 @@ def __init__( class PortCondition(_serialization.Model): """Port condition that needs to be matched. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort" and "DestinationPort". @@ -747,7 +785,7 @@ class PortCondition(_serialization.Model): :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol :ivar ports: List of the Ports that need to be matched. :vartype ports: list[str] - :ivar port_group_names: List of the port Group Names that to be matched. + :ivar port_group_names: List of the port Group Names that need to be matched. :vartype port_group_names: list[str] """ @@ -769,8 +807,8 @@ def __init__( *, layer4_protocol: Union[str, "_models.Layer4Protocol"], port_type: Optional[Union[str, "_models.PortType"]] = None, - ports: Optional[List[str]] = None, - port_group_names: Optional[List[str]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -782,7 +820,7 @@ def __init__( :paramtype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol :keyword ports: List of the Ports that need to be matched. :paramtype ports: list[str] - :keyword port_group_names: List of the port Group Names that to be matched. + :keyword port_group_names: List of the port Group Names that need to be matched. :paramtype port_group_names: list[str] """ super().__init__(**kwargs) @@ -795,7 +833,7 @@ def __init__( class AccessControlListPortCondition(PortCondition): """Defines the port condition that needs to be matched. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort" and "DestinationPort". @@ -805,9 +843,11 @@ class AccessControlListPortCondition(PortCondition): :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol :ivar ports: List of the Ports that need to be matched. :vartype ports: list[str] - :ivar port_group_names: List of the port Group Names that to be matched. + :ivar port_group_names: List of the port Group Names that need to be matched. :vartype port_group_names: list[str] - :ivar flags: List of protocol flags that needs to be matched. + :ivar flags: List of protocol flags that need to be matched. Example: established | initial | + :code:``. List of eligible TCP Flags are ack, fin, not-ack, not-fin, + not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg. :vartype flags: list[str] """ @@ -830,9 +870,9 @@ def __init__( *, layer4_protocol: Union[str, "_models.Layer4Protocol"], port_type: Optional[Union[str, "_models.PortType"]] = None, - ports: Optional[List[str]] = None, - port_group_names: Optional[List[str]] = None, - flags: Optional[List[str]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, + flags: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -844,9 +884,11 @@ def __init__( :paramtype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol :keyword ports: List of the Ports that need to be matched. :paramtype ports: list[str] - :keyword port_group_names: List of the port Group Names that to be matched. + :keyword port_group_names: List of the port Group Names that need to be matched. :paramtype port_group_names: list[str] - :keyword flags: List of protocol flags that needs to be matched. + :keyword flags: List of protocol flags that need to be matched. Example: established | initial + | :code:``. List of eligible TCP Flags are ack, fin, not-ack, not-fin, + not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg. :paramtype flags: list[str] """ super().__init__( @@ -869,6 +911,9 @@ class AccessControlListProperties(AnnotationResource, AccessControlListPatchable :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :ivar acls_url: Access Control List file URL. :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar match_configurations: List of match configurations. :vartype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -881,7 +926,7 @@ class AccessControlListProperties(AnnotationResource, AccessControlListPatchable :vartype last_synced_time: ~datetime.datetime :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -905,6 +950,7 @@ class AccessControlListProperties(AnnotationResource, AccessControlListPatchable _attribute_map = { "configuration_type": {"key": "configurationType", "type": "str"}, "acls_url": {"key": "aclsUrl", "type": "str"}, + "default_action": {"key": "defaultAction", "type": "str"}, "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, "dynamic_match_configurations": { "key": "dynamicMatchConfigurations", @@ -922,8 +968,9 @@ def __init__( *, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, acls_url: Optional[str] = None, - match_configurations: Optional[List["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -933,6 +980,9 @@ def __init__( :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType :keyword acls_url: Access Control List file URL. :paramtype acls_url: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword match_configurations: List of match configurations. :paramtype match_configurations: list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] @@ -946,18 +996,20 @@ def __init__( annotation=annotation, configuration_type=configuration_type, acls_url=acls_url, + default_action=default_action, match_configurations=match_configurations, dynamic_match_configurations=dynamic_match_configurations, **kwargs ) self.configuration_type = configuration_type self.acls_url = acls_url + self.default_action = default_action self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations - self.last_synced_time = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.last_synced_time: Optional[datetime.datetime] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation @@ -978,7 +1030,7 @@ class AccessControlListsListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.AccessControlList"]] = None, + value: Optional[list["_models.AccessControlList"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -1094,7 +1146,7 @@ def __init__( self.add = add -class IpExtendedCommunitySetOperationProperties(_serialization.Model): +class IpExtendedCommunitySetOperationProperties(_serialization.Model): # pylint: disable=name-too-long """IP Extended Community set operation properties. :ivar set: List of IP Extended Community IDs. @@ -1114,7 +1166,7 @@ def __init__(self, *, set: Optional["_models.IpExtendedCommunityIdList"] = None, self.set = set -class IpExtendedCommunityDeleteOperationProperties(_serialization.Model): +class IpExtendedCommunityDeleteOperationProperties(_serialization.Model): # pylint: disable=name-too-long """IP Extended Community delete operation properties. :ivar delete: List of IP Extended Community IDs. @@ -1134,7 +1186,7 @@ def __init__(self, *, delete: Optional["_models.IpExtendedCommunityIdList"] = No self.delete = delete -class IpExtendedCommunityAddOperationProperties(_serialization.Model): +class IpExtendedCommunityAddOperationProperties(_serialization.Model): # pylint: disable=name-too-long """IP Extended Community add operation properties. :ivar add: List of IP Extended Community IDs. @@ -1200,7 +1252,7 @@ def __init__( class AggregateRoute(_serialization.Model): """aggregateIpv4Route model. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar prefix: IPv4 Prefix of the aggregate Ipv4Route. Required. :vartype prefix: str @@ -1245,8 +1297,8 @@ class AggregateRouteConfiguration(_serialization.Model): def __init__( self, *, - ipv4_routes: Optional[List["_models.AggregateRoute"]] = None, - ipv6_routes: Optional[List["_models.AggregateRoute"]] = None, + ipv4_routes: Optional[list["_models.AggregateRoute"]] = None, + ipv6_routes: Optional[list["_models.AggregateRoute"]] = None, **kwargs: Any ) -> None: """ @@ -1293,12 +1345,12 @@ def __init__(self, *, interval_in_milli_seconds: int = 300, multiplier: int = 5, :paramtype multiplier: int """ super().__init__(**kwargs) - self.administrative_state = None + self.administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None self.interval_in_milli_seconds = interval_in_milli_seconds self.multiplier = multiplier -class BgpConfiguration(AnnotationResource): # pylint: disable=too-many-instance-attributes +class BgpConfiguration(AnnotationResource): """BGP configuration properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -1363,10 +1415,10 @@ def __init__( allow_as: int = 2, allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = None, peer_asn: Optional[int] = None, - ipv4_listen_range_prefixes: Optional[List[str]] = None, - ipv6_listen_range_prefixes: Optional[List[str]] = None, - ipv4_neighbor_address: Optional[List["_models.NeighborAddress"]] = None, - ipv6_neighbor_address: Optional[List["_models.NeighborAddress"]] = None, + ipv4_listen_range_prefixes: Optional[list[str]] = None, + ipv6_listen_range_prefixes: Optional[list[str]] = None, + ipv4_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, + ipv6_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, **kwargs: Any ) -> None: """ @@ -1399,7 +1451,7 @@ def __init__( self.default_route_originate = default_route_originate self.allow_as = allow_as self.allow_as_override = allow_as_override - self.fabric_asn = None + self.fabric_asn: Optional[int] = None self.peer_asn = peer_asn self.ipv4_listen_range_prefixes = ipv4_listen_range_prefixes self.ipv6_listen_range_prefixes = ipv6_listen_range_prefixes @@ -1414,7 +1466,7 @@ class CommonDynamicMatchConfiguration(_serialization.Model): :vartype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupProperties] :ivar vlan_groups: List of vlan groups. :vartype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupProperties] - :ivar port_groups: List of the port group. + :ivar port_groups: List of the port groups. :vartype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupProperties] """ @@ -1433,9 +1485,9 @@ class CommonDynamicMatchConfiguration(_serialization.Model): def __init__( self, *, - ip_groups: Optional[List["_models.IpGroupProperties"]] = None, - vlan_groups: Optional[List["_models.VlanGroupProperties"]] = None, - port_groups: Optional[List["_models.PortGroupProperties"]] = None, + ip_groups: Optional[list["_models.IpGroupProperties"]] = None, + vlan_groups: Optional[list["_models.VlanGroupProperties"]] = None, + port_groups: Optional[list["_models.PortGroupProperties"]] = None, **kwargs: Any ) -> None: """ @@ -1443,7 +1495,7 @@ def __init__( :paramtype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupProperties] :keyword vlan_groups: List of vlan groups. :paramtype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupProperties] - :keyword port_groups: List of the port group. + :keyword port_groups: List of the port groups. :paramtype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupProperties] """ super().__init__(**kwargs) @@ -1482,7 +1534,7 @@ class CommonPostActionResponseForDeviceUpdate(ErrorResponse): :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar successful_devices: List of ARM Resource IDs for which the given action applied successfully. @@ -1506,8 +1558,8 @@ def __init__( self, *, error: Optional["_models.ErrorDetail"] = None, - successful_devices: Optional[List[str]] = None, - failed_devices: Optional[List[str]] = None, + successful_devices: Optional[list[str]] = None, + failed_devices: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -1520,7 +1572,7 @@ def __init__( :paramtype failed_devices: list[str] """ super().__init__(error=error, **kwargs) - self.configuration_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None self.successful_devices = successful_devices self.failed_devices = failed_devices @@ -1534,7 +1586,7 @@ class CommonPostActionResponseForStateUpdate(ErrorResponse): :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState """ @@ -1553,13 +1605,13 @@ def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: A :paramtype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail """ super().__init__(error=error, **kwargs) - self.configuration_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None class ConnectedSubnet(AnnotationResource): """Connected Subnet properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -1640,8 +1692,8 @@ class ControllerServices(_serialization.Model): def __init__( self, *, - ipv4_address_spaces: Optional[List[str]] = None, - ipv6_address_spaces: Optional[List[str]] = None, + ipv4_address_spaces: Optional[list[str]] = None, + ipv6_address_spaces: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -1744,7 +1796,7 @@ def __init__( *, identifier: Optional[str] = None, interface_type: Optional[str] = None, - supported_connector_types: Optional[List["_models.SupportedConnectorProperties"]] = None, + supported_connector_types: Optional[list["_models.SupportedConnectorProperties"]] = None, **kwargs: Any ) -> None: """ @@ -1773,7 +1825,7 @@ class EnableDisableOnResources(_serialization.Model): "resource_ids": {"key": "resourceIds", "type": "[str]"}, } - def __init__(self, *, resource_ids: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, resource_ids: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword resource_ids: Network Fabrics or Network Rack resource Id. :paramtype resource_ids: list[str] @@ -1806,8 +1858,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -1846,11 +1898,11 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetail"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None class ExportRoutePolicy(_serialization.Model): @@ -1921,7 +1973,7 @@ class ExpressRouteConnectionInformation(_serialization.Model): """The ExpressRoute circuit ID and the Auth Key are required for you to successfully deploy NFC service. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar express_route_circuit_id: The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory @@ -2026,31 +2078,13 @@ class ProxyResource(Resource): :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData """ - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - -class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attributes +class ExternalNetwork(ProxyResource): """Defines the External Network 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -2065,6 +2099,9 @@ class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData :ivar annotation: Switch configuration description. :vartype annotation: str + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :vartype import_route_policy_id: str @@ -2075,9 +2112,6 @@ class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar network_to_network_interconnect_id: Gets the networkToNetworkInterconnectId of the - resource. - :vartype network_to_network_interconnect_id: str :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption :ivar option_b_properties: option B properties object. @@ -2087,7 +2121,7 @@ class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -2103,7 +2137,6 @@ class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri "name": {"readonly": True}, "type": {"readonly": True}, "system_data": {"readonly": True}, - "network_to_network_interconnect_id": {"readonly": True}, "peering_option": {"required": True}, "configuration_state": {"readonly": True}, "provisioning_state": {"readonly": True}, @@ -2116,11 +2149,11 @@ class ExternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "annotation": {"key": "properties.annotation", "type": "str"}, + "network_to_network_interconnect_id": {"key": "properties.networkToNetworkInterconnectId", "type": "str"}, "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicy"}, - "network_to_network_interconnect_id": {"key": "properties.networkToNetworkInterconnectId", "type": "str"}, "peering_option": {"key": "properties.peeringOption", "type": "str"}, "option_b_properties": {"key": "properties.optionBProperties", "type": "L3OptionBProperties"}, "option_a_properties": { @@ -2137,6 +2170,7 @@ def __init__( *, peering_option: Union[str, "_models.PeeringOption"], annotation: Optional[str] = None, + network_to_network_interconnect_id: Optional[str] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -2148,6 +2182,9 @@ def __init__( """ :keyword annotation: Switch configuration description. :paramtype annotation: str + :keyword network_to_network_interconnect_id: ARM Resource ID of the + networkToNetworkInterconnectId of the ExternalNetwork resource. + :paramtype network_to_network_interconnect_id: str :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :paramtype import_route_policy_id: str @@ -2169,17 +2206,17 @@ def __init__( """ super().__init__(**kwargs) self.annotation = annotation + self.network_to_network_interconnect_id = network_to_network_interconnect_id self.import_route_policy_id = import_route_policy_id self.export_route_policy_id = export_route_policy_id self.import_route_policy = import_route_policy self.export_route_policy = export_route_policy - self.network_to_network_interconnect_id = None self.peering_option = peering_option self.option_b_properties = option_b_properties self.option_a_properties = option_a_properties - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class ExternalNetworkPatch(_serialization.Model): @@ -2187,6 +2224,9 @@ class ExternalNetworkPatch(_serialization.Model): :ivar annotation: Switch configuration description. :vartype annotation: str + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :vartype import_route_policy_id: str @@ -2208,6 +2248,7 @@ class ExternalNetworkPatch(_serialization.Model): _attribute_map = { "annotation": {"key": "properties.annotation", "type": "str"}, + "network_to_network_interconnect_id": {"key": "properties.networkToNetworkInterconnectId", "type": "str"}, "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, @@ -2224,6 +2265,7 @@ def __init__( self, *, annotation: Optional[str] = None, + network_to_network_interconnect_id: Optional[str] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -2236,6 +2278,9 @@ def __init__( """ :keyword annotation: Switch configuration description. :paramtype annotation: str + :keyword network_to_network_interconnect_id: ARM Resource ID of the + networkToNetworkInterconnectId of the ExternalNetwork resource. + :paramtype network_to_network_interconnect_id: str :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :paramtype import_route_policy_id: str @@ -2256,6 +2301,7 @@ def __init__( """ super().__init__(**kwargs) self.annotation = annotation + self.network_to_network_interconnect_id = network_to_network_interconnect_id self.import_route_policy_id = import_route_policy_id self.export_route_policy_id = export_route_policy_id self.import_route_policy = import_route_policy @@ -2268,6 +2314,9 @@ def __init__( class ExternalNetworkPatchableProperties(_serialization.Model): """The ExternalNetwork patchable properties. + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :vartype import_route_policy_id: str @@ -2281,6 +2330,7 @@ class ExternalNetworkPatchableProperties(_serialization.Model): """ _attribute_map = { + "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, @@ -2290,6 +2340,7 @@ class ExternalNetworkPatchableProperties(_serialization.Model): def __init__( self, *, + network_to_network_interconnect_id: Optional[str] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -2297,6 +2348,9 @@ def __init__( **kwargs: Any ) -> None: """ + :keyword network_to_network_interconnect_id: ARM Resource ID of the + networkToNetworkInterconnectId of the ExternalNetwork resource. + :paramtype network_to_network_interconnect_id: str :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :paramtype import_route_policy_id: str @@ -2309,6 +2363,7 @@ def __init__( :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy """ super().__init__(**kwargs) + self.network_to_network_interconnect_id = network_to_network_interconnect_id self.import_route_policy_id = import_route_policy_id self.export_route_policy_id = export_route_policy_id self.import_route_policy = import_route_policy @@ -2318,6 +2373,9 @@ def __init__( class ExternalNetworkPatchProperties(AnnotationResource, ExternalNetworkPatchableProperties): """External Network Patch properties. + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :vartype import_route_policy_id: str @@ -2340,6 +2398,7 @@ class ExternalNetworkPatchProperties(AnnotationResource, ExternalNetworkPatchabl """ _attribute_map = { + "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, @@ -2353,6 +2412,7 @@ class ExternalNetworkPatchProperties(AnnotationResource, ExternalNetworkPatchabl def __init__( self, *, + network_to_network_interconnect_id: Optional[str] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -2364,6 +2424,9 @@ def __init__( **kwargs: Any ) -> None: """ + :keyword network_to_network_interconnect_id: ARM Resource ID of the + networkToNetworkInterconnectId of the ExternalNetwork resource. + :paramtype network_to_network_interconnect_id: str :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :paramtype import_route_policy_id: str @@ -2386,12 +2449,14 @@ def __init__( """ super().__init__( annotation=annotation, + network_to_network_interconnect_id=network_to_network_interconnect_id, import_route_policy_id=import_route_policy_id, export_route_policy_id=export_route_policy_id, import_route_policy=import_route_policy, export_route_policy=export_route_policy, **kwargs ) + self.network_to_network_interconnect_id = network_to_network_interconnect_id self.import_route_policy_id = import_route_policy_id self.export_route_policy_id = export_route_policy_id self.import_route_policy = import_route_policy @@ -2468,7 +2533,7 @@ def __init__( super().__init__(**kwargs) self.mtu = mtu self.vlan_id = vlan_id - self.fabric_asn = None + self.fabric_asn: Optional[int] = None self.peer_asn = peer_asn self.bfd_configuration = bfd_configuration self.ingress_acl_id = ingress_acl_id @@ -2523,7 +2588,7 @@ def __init__( class ExternalNetworkPatchPropertiesOptionAProperties( Layer3IpPrefixProperties, L3OptionAProperties -): # pylint: disable=too-many-instance-attributes +): # pylint: disable=name-too-long """option A properties object. Variables are only populated by the server, and will be ignored when sending a request. @@ -2625,7 +2690,7 @@ def __init__( ) self.mtu = mtu self.vlan_id = vlan_id - self.fabric_asn = None + self.fabric_asn: Optional[int] = None self.peer_asn = peer_asn self.bfd_configuration = bfd_configuration self.ingress_acl_id = ingress_acl_id @@ -2636,15 +2701,16 @@ def __init__( self.secondary_ipv6_prefix = secondary_ipv6_prefix -class ExternalNetworkProperties( - AnnotationResource, ExternalNetworkPatchableProperties -): # pylint: disable=too-many-instance-attributes +class ExternalNetworkProperties(AnnotationResource, ExternalNetworkPatchableProperties): """External Network 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. + All required parameters must be populated in order to send to server. + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :vartype import_route_policy_id: str @@ -2657,9 +2723,6 @@ class ExternalNetworkProperties( :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy :ivar annotation: Switch configuration description. :vartype annotation: str - :ivar network_to_network_interconnect_id: Gets the networkToNetworkInterconnectId of the - resource. - :vartype network_to_network_interconnect_id: str :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption :ivar option_b_properties: option B properties object. @@ -2669,7 +2732,7 @@ class ExternalNetworkProperties( ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -2681,7 +2744,6 @@ class ExternalNetworkProperties( """ _validation = { - "network_to_network_interconnect_id": {"readonly": True}, "peering_option": {"required": True}, "configuration_state": {"readonly": True}, "provisioning_state": {"readonly": True}, @@ -2689,12 +2751,12 @@ class ExternalNetworkProperties( } _attribute_map = { + "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, "annotation": {"key": "annotation", "type": "str"}, - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, "peering_option": {"key": "peeringOption", "type": "str"}, "option_b_properties": {"key": "optionBProperties", "type": "L3OptionBProperties"}, "option_a_properties": {"key": "optionAProperties", "type": "ExternalNetworkPropertiesOptionAProperties"}, @@ -2707,6 +2769,7 @@ def __init__( self, *, peering_option: Union[str, "_models.PeeringOption"], + network_to_network_interconnect_id: Optional[str] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -2717,6 +2780,9 @@ def __init__( **kwargs: Any ) -> None: """ + :keyword network_to_network_interconnect_id: ARM Resource ID of the + networkToNetworkInterconnectId of the ExternalNetwork resource. + :paramtype network_to_network_interconnect_id: str :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. :paramtype import_route_policy_id: str @@ -2740,29 +2806,30 @@ def __init__( """ super().__init__( annotation=annotation, + network_to_network_interconnect_id=network_to_network_interconnect_id, import_route_policy_id=import_route_policy_id, export_route_policy_id=export_route_policy_id, import_route_policy=import_route_policy, export_route_policy=export_route_policy, **kwargs ) + self.network_to_network_interconnect_id = network_to_network_interconnect_id self.import_route_policy_id = import_route_policy_id self.export_route_policy_id = export_route_policy_id self.import_route_policy = import_route_policy self.export_route_policy = export_route_policy - self.network_to_network_interconnect_id = None self.peering_option = peering_option self.option_b_properties = option_b_properties self.option_a_properties = option_a_properties - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation class ExternalNetworkPropertiesOptionAProperties( Layer3IpPrefixProperties, L3OptionAProperties -): # pylint: disable=too-many-instance-attributes +): # pylint: disable=name-too-long """option A properties object. Variables are only populated by the server, and will be ignored when sending a request. @@ -2864,7 +2931,7 @@ def __init__( ) self.mtu = mtu self.vlan_id = vlan_id - self.fabric_asn = None + self.fabric_asn: Optional[int] = None self.peer_asn = peer_asn self.bfd_configuration = bfd_configuration self.ingress_acl_id = ingress_acl_id @@ -2890,7 +2957,7 @@ class ExternalNetworksList(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ExternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.ExternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of External Network resources. @@ -2967,12 +3034,12 @@ def __init__( self.import_ipv6_route_policy_id = import_ipv6_route_policy_id -class InternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attributes +class InternalNetwork(ProxyResource): """Defines the Internal Network 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -3024,7 +3091,7 @@ class InternalNetwork(ProxyResource): # pylint: disable=too-many-instance-attri ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -3086,8 +3153,8 @@ def __init__( vlan_id: int, annotation: Optional[str] = None, mtu: int = 1500, - connected_i_pv4_subnets: Optional[List["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[List["_models.ConnectedSubnet"]] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -3157,12 +3224,12 @@ def __init__( self.vlan_id = vlan_id self.bgp_configuration = bgp_configuration self.static_route_configuration = static_route_configuration - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None -class InternalNetworkPatch(_serialization.Model): # pylint: disable=too-many-instance-attributes +class InternalNetworkPatch(_serialization.Model): """The InternalNetwork patch resource definition. :ivar annotation: Switch configuration description. @@ -3228,8 +3295,8 @@ def __init__( *, annotation: Optional[str] = None, mtu: int = 1500, - connected_i_pv4_subnets: Optional[List["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[List["_models.ConnectedSubnet"]] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -3344,8 +3411,8 @@ def __init__( self, *, mtu: int = 1500, - connected_i_pv4_subnets: Optional[List["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[List["_models.ConnectedSubnet"]] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -3396,9 +3463,7 @@ def __init__( self.is_monitoring_enabled = is_monitoring_enabled -class InternalNetworkPatchProperties( - AnnotationResource, InternalNetworkPatchableProperties -): # pylint: disable=too-many-instance-attributes +class InternalNetworkPatchProperties(AnnotationResource, InternalNetworkPatchableProperties): """InternalNetwork Patch properties. :ivar mtu: Maximum transmission unit. Default value is 1500. @@ -3460,8 +3525,8 @@ def __init__( self, *, mtu: int = 1500, - connected_i_pv4_subnets: Optional[List["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[List["_models.ConnectedSubnet"]] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -3538,14 +3603,12 @@ def __init__( self.annotation = annotation -class InternalNetworkProperties( - AnnotationResource, InternalNetworkPatchableProperties, ExtensionEnumProperty -): # pylint: disable=too-many-instance-attributes +class InternalNetworkProperties(AnnotationResource, InternalNetworkPatchableProperties, ExtensionEnumProperty): """Internal Network Properties defines the properties of the 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. + All required parameters must be populated in order to send to server. :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and "NPB". @@ -3586,7 +3649,7 @@ class InternalNetworkProperties( ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -3637,8 +3700,8 @@ def __init__( vlan_id: int, extension: Union[str, "_models.Extension"] = "NoExtension", mtu: int = 1500, - connected_i_pv4_subnets: Optional[List["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[List["_models.ConnectedSubnet"]] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, import_route_policy_id: Optional[str] = None, export_route_policy_id: Optional[str] = None, import_route_policy: Optional["_models.ImportRoutePolicy"] = None, @@ -3721,13 +3784,13 @@ def __init__( self.vlan_id = vlan_id self.bgp_configuration = bgp_configuration self.static_route_configuration = static_route_configuration - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation -class InternalNetworkPropertiesBgpConfiguration(BgpConfiguration): # pylint: disable=too-many-instance-attributes +class InternalNetworkPropertiesBgpConfiguration(BgpConfiguration): # pylint: disable=name-too-long """BGP configuration properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -3759,84 +3822,6 @@ class InternalNetworkPropertiesBgpConfiguration(BgpConfiguration): # pylint: di :vartype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] """ - _validation = { - "allow_as": {"maximum": 10, "minimum": 0}, - "fabric_asn": {"readonly": True}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - "ipv4_listen_range_prefixes": {"min_items": 1}, - "ipv6_listen_range_prefixes": {"min_items": 1}, - "ipv4_neighbor_address": {"min_items": 1}, - "ipv6_neighbor_address": {"min_items": 1}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "default_route_originate": {"key": "defaultRouteOriginate", "type": "str"}, - "allow_as": {"key": "allowAS", "type": "int"}, - "allow_as_override": {"key": "allowASOverride", "type": "str"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "ipv4_listen_range_prefixes": {"key": "ipv4ListenRangePrefixes", "type": "[str]"}, - "ipv6_listen_range_prefixes": {"key": "ipv6ListenRangePrefixes", "type": "[str]"}, - "ipv4_neighbor_address": {"key": "ipv4NeighborAddress", "type": "[NeighborAddress]"}, - "ipv6_neighbor_address": {"key": "ipv6NeighborAddress", "type": "[NeighborAddress]"}, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, - allow_as: int = 2, - allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = None, - peer_asn: Optional[int] = None, - ipv4_listen_range_prefixes: Optional[List[str]] = None, - ipv6_listen_range_prefixes: Optional[List[str]] = None, - ipv4_neighbor_address: Optional[List["_models.NeighborAddress"]] = None, - ipv6_neighbor_address: Optional[List["_models.NeighborAddress"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values - are: "True" and "False". - :paramtype default_route_originate: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :keyword allow_as: Allows for routes to be received and processed even if the router detects - its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. - :paramtype allow_as: int - :keyword allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". - :paramtype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride - :keyword peer_asn: Peer ASN. Example: 65047. - :paramtype peer_asn: int - :keyword ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. - :paramtype ipv4_listen_range_prefixes: list[str] - :keyword ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. - :paramtype ipv6_listen_range_prefixes: list[str] - :keyword ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. - :paramtype ipv4_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - :keyword ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. - :paramtype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - """ - super().__init__( - annotation=annotation, - bfd_configuration=bfd_configuration, - default_route_originate=default_route_originate, - allow_as=allow_as, - allow_as_override=allow_as_override, - peer_asn=peer_asn, - ipv4_listen_range_prefixes=ipv4_listen_range_prefixes, - ipv6_listen_range_prefixes=ipv6_listen_range_prefixes, - ipv4_neighbor_address=ipv4_neighbor_address, - ipv6_neighbor_address=ipv6_neighbor_address, - **kwargs - ) - class StaticRouteConfiguration(_serialization.Model): """Static Route Configuration properties. @@ -3864,8 +3849,8 @@ def __init__( self, *, bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[List["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[List["_models.StaticRouteProperties"]] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, **kwargs: Any ) -> None: """ @@ -3882,7 +3867,9 @@ def __init__( self.ipv6_routes = ipv6_routes -class InternalNetworkPropertiesStaticRouteConfiguration(StaticRouteConfiguration, ExtensionEnumProperty): +class InternalNetworkPropertiesStaticRouteConfiguration( + StaticRouteConfiguration, ExtensionEnumProperty +): # pylint: disable=name-too-long """Static Route Configuration properties. :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and @@ -3913,8 +3900,8 @@ def __init__( *, extension: Union[str, "_models.Extension"] = "NoExtension", bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[List["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[List["_models.StaticRouteProperties"]] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, **kwargs: Any ) -> None: """ @@ -3956,7 +3943,7 @@ class InternalNetworksList(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.InternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.InternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of Internal Network resources. @@ -3969,12 +3956,12 @@ def __init__( self.next_link = next_link -class InternetGateway(TrackedResource): # pylint: disable=too-many-instance-attributes +class InternetGateway(TrackedResource): """The Internet Gateway resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -4044,7 +4031,7 @@ def __init__( location: str, type_properties_type: Union[str, "_models.GatewayType"], network_fabric_controller_id: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, internet_gateway_rule_id: Optional[str] = None, **kwargs: Any @@ -4068,11 +4055,11 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.internet_gateway_rule_id = internet_gateway_rule_id - self.ipv4_address = None - self.port = None + self.ipv4_address: Optional[str] = None + self.port: Optional[int] = None self.type_properties_type = type_properties_type self.network_fabric_controller_id = network_fabric_controller_id - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class InternetGatewayPatch(TagsUpdate): @@ -4090,7 +4077,7 @@ class InternetGatewayPatch(TagsUpdate): } def __init__( - self, *, tags: Optional[Dict[str, str]] = None, internet_gateway_rule_id: Optional[str] = None, **kwargs: Any + self, *, tags: Optional[dict[str, str]] = None, internet_gateway_rule_id: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword tags: Resource tags. @@ -4127,7 +4114,7 @@ class InternetGatewayProperties(AnnotationResource, InternetGatewayPatchableProp 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. + All required parameters must be populated in order to send to server. :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. :vartype internet_gateway_rule_id: str @@ -4188,11 +4175,11 @@ def __init__( """ super().__init__(annotation=annotation, internet_gateway_rule_id=internet_gateway_rule_id, **kwargs) self.internet_gateway_rule_id = internet_gateway_rule_id - self.ipv4_address = None - self.port = None + self.ipv4_address: Optional[str] = None + self.port: Optional[int] = None self.type = type self.network_fabric_controller_id = network_fabric_controller_id - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.annotation = annotation @@ -4201,7 +4188,7 @@ class InternetGatewayRule(TrackedResource): 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -4258,7 +4245,7 @@ def __init__( *, location: str, rule_properties: "_models.RuleProperties", - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -4275,8 +4262,8 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.rule_properties = rule_properties - self.provisioning_state = None - self.internet_gateway_ids = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.internet_gateway_ids: Optional[list[str]] = None class InternetGatewayRulePatch(TagsUpdate): @@ -4286,24 +4273,13 @@ class InternetGatewayRulePatch(TagsUpdate): :vartype tags: dict[str, str] """ - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(tags=tags, **kwargs) - class InternetGatewayRuleProperties(AnnotationResource): """Internet Gateway Rule Properties defines the resource 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. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -4340,8 +4316,8 @@ def __init__( """ super().__init__(annotation=annotation, **kwargs) self.rule_properties = rule_properties - self.provisioning_state = None - self.internet_gateway_ids = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.internet_gateway_ids: Optional[list[str]] = None class InternetGatewayRulesListResult(_serialization.Model): @@ -4361,7 +4337,7 @@ class InternetGatewayRulesListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.InternetGatewayRule"]] = None, + value: Optional[list["_models.InternetGatewayRule"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -4391,7 +4367,7 @@ class InternetGatewaysListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.InternetGateway"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.InternetGateway"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Displays list of Internet Gateway resources. @@ -4419,7 +4395,7 @@ class IpCommunitiesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.IpCommunity"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.IpCommunity"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of IP Community resources. @@ -4432,12 +4408,12 @@ def __init__( self.next_link = next_link -class IpCommunity(TrackedResource): # pylint: disable=too-many-instance-attributes +class IpCommunity(TrackedResource): """The IP Community resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -4460,7 +4436,7 @@ class IpCommunity(TrackedResource): # pylint: disable=too-many-instance-attribu :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -4500,9 +4476,9 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, - ip_community_rules: Optional[List["_models.IpCommunityRule"]] = None, + ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, **kwargs: Any ) -> None: """ @@ -4518,9 +4494,9 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.ip_community_rules = ip_community_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class IpCommunityIdList(_serialization.Model): @@ -4534,7 +4510,7 @@ class IpCommunityIdList(_serialization.Model): "ip_community_ids": {"key": "ipCommunityIds", "type": "[str]"}, } - def __init__(self, *, ip_community_ids: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, ip_community_ids: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword ip_community_ids: List of IP Community resource IDs. :paramtype ip_community_ids: list[str] @@ -4560,8 +4536,8 @@ class IpCommunityPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - ip_community_rules: Optional[List["_models.IpCommunityRule"]] = None, + tags: Optional[dict[str, str]] = None, + ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, **kwargs: Any ) -> None: """ @@ -4585,7 +4561,7 @@ class IpCommunityPatchableProperties(_serialization.Model): "ip_community_rules": {"key": "ipCommunityRules", "type": "[IpCommunityRule]"}, } - def __init__(self, *, ip_community_rules: Optional[List["_models.IpCommunityRule"]] = None, **kwargs: Any) -> None: + def __init__(self, *, ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, **kwargs: Any) -> None: """ :keyword ip_community_rules: List of IP Community Rules. :paramtype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] @@ -4605,7 +4581,7 @@ class IpCommunityProperties(AnnotationResource, IpCommunityPatchableProperties): :vartype annotation: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -4633,7 +4609,7 @@ class IpCommunityProperties(AnnotationResource, IpCommunityPatchableProperties): def __init__( self, *, - ip_community_rules: Optional[List["_models.IpCommunityRule"]] = None, + ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -4645,16 +4621,16 @@ def __init__( """ super().__init__(annotation=annotation, ip_community_rules=ip_community_rules, **kwargs) self.ip_community_rules = ip_community_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation class IpCommunityRule(_serialization.Model): """IP Community patchable properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: "Permit" and "Deny". @@ -4690,8 +4666,8 @@ def __init__( *, action: Union[str, "_models.CommunityActionTypes"], sequence_number: int, - community_members: List[str], - well_known_communities: Optional[List[Union[str, "_models.WellKnownCommunities"]]] = None, + community_members: list[str], + well_known_communities: Optional[list[Union[str, "_models.WellKnownCommunities"]]] = None, **kwargs: Any ) -> None: """ @@ -4716,12 +4692,12 @@ def __init__( self.community_members = community_members -class IpExtendedCommunity(TrackedResource): # pylint: disable=too-many-instance-attributes +class IpExtendedCommunity(TrackedResource): """The IP Extended Community resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -4745,7 +4721,7 @@ class IpExtendedCommunity(TrackedResource): # pylint: disable=too-many-instance list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -4789,8 +4765,8 @@ def __init__( self, *, location: str, - ip_extended_community_rules: List["_models.IpExtendedCommunityRule"], - tags: Optional[Dict[str, str]] = None, + ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -4808,9 +4784,9 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.ip_extended_community_rules = ip_extended_community_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class IpExtendedCommunityIdList(_serialization.Model): @@ -4824,7 +4800,7 @@ class IpExtendedCommunityIdList(_serialization.Model): "ip_extended_community_ids": {"key": "ipExtendedCommunityIds", "type": "[str]"}, } - def __init__(self, *, ip_extended_community_ids: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, ip_extended_community_ids: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword ip_extended_community_ids: List of IP Extended Community resource IDs. :paramtype ip_extended_community_ids: list[str] @@ -4850,7 +4826,7 @@ class IpExtendedCommunityListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.IpExtendedCommunity"]] = None, + value: Optional[list["_models.IpExtendedCommunity"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -4889,8 +4865,8 @@ class IpExtendedCommunityPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - ip_extended_community_rules: Optional[List["_models.IpExtendedCommunityRule"]] = None, + tags: Optional[dict[str, str]] = None, + ip_extended_community_rules: Optional[list["_models.IpExtendedCommunityRule"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -4911,7 +4887,7 @@ def __init__( class IpExtendedCommunityPatchableProperties(_serialization.Model): """IP Extended Community patchable properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. :vartype ip_extended_community_rules: @@ -4926,7 +4902,7 @@ class IpExtendedCommunityPatchableProperties(_serialization.Model): "ip_extended_community_rules": {"key": "ipExtendedCommunityRules", "type": "[IpExtendedCommunityRule]"}, } - def __init__(self, *, ip_extended_community_rules: List["_models.IpExtendedCommunityRule"], **kwargs: Any) -> None: + def __init__(self, *, ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], **kwargs: Any) -> None: """ :keyword ip_extended_community_rules: List of IP Extended Community Rules. Required. :paramtype ip_extended_community_rules: @@ -4939,7 +4915,7 @@ def __init__(self, *, ip_extended_community_rules: List["_models.IpExtendedCommu class IpExtendedCommunityPatchProperties(IpExtendedCommunityPatchableProperties, AnnotationResource): """IP Extended Community patchable properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -4960,7 +4936,7 @@ class IpExtendedCommunityPatchProperties(IpExtendedCommunityPatchableProperties, def __init__( self, *, - ip_extended_community_rules: List["_models.IpExtendedCommunityRule"], + ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -4981,7 +4957,7 @@ class IpExtendedCommunityProperties(AnnotationResource, IpExtendedCommunityPatch 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. + All required parameters must be populated in order to send to server. :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. :vartype ip_extended_community_rules: @@ -4990,7 +4966,7 @@ class IpExtendedCommunityProperties(AnnotationResource, IpExtendedCommunityPatch :vartype annotation: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5019,7 +4995,7 @@ class IpExtendedCommunityProperties(AnnotationResource, IpExtendedCommunityPatch def __init__( self, *, - ip_extended_community_rules: List["_models.IpExtendedCommunityRule"], + ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -5032,16 +5008,16 @@ def __init__( """ super().__init__(annotation=annotation, ip_extended_community_rules=ip_extended_community_rules, **kwargs) self.ip_extended_community_rules = ip_extended_community_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation class IpExtendedCommunityRule(_serialization.Model): """List of IP Extended Community Rules. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: "Permit" and "Deny". @@ -5075,7 +5051,7 @@ def __init__( *, action: Union[str, "_models.CommunityActionTypes"], sequence_number: int, - route_targets: List[str], + route_targets: list[str], **kwargs: Any ) -> None: """ @@ -5126,7 +5102,7 @@ def __init__( *, name: Optional[str] = None, ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - ip_prefixes: Optional[List[str]] = None, + ip_prefixes: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -5146,11 +5122,13 @@ def __init__( class IpMatchCondition(_serialization.Model): """Defines the condition that can be filtered using the selected IPs. - :ivar type: IP Address type. Known values are: "SourceIP" and "DestinationIP". + :ivar type: IP Address type that needs to be matched. Known values are: "SourceIP" and + "DestinationIP". :vartype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType - :ivar prefix_type: IP Prefix Type. Known values are: "Prefix" and "LongestPrefix". + :ivar prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and + "LongestPrefix". :vartype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType - :ivar ip_prefix_values: The list of IP Prefixes. + :ivar ip_prefix_values: The list of IP Prefixes that need to be matched. :vartype ip_prefix_values: list[str] :ivar ip_group_names: The List of IP Group Names that need to be matched. :vartype ip_group_names: list[str] @@ -5173,16 +5151,18 @@ def __init__( *, type: Optional[Union[str, "_models.SourceDestinationType"]] = None, prefix_type: Optional[Union[str, "_models.PrefixType"]] = None, - ip_prefix_values: Optional[List[str]] = None, - ip_group_names: Optional[List[str]] = None, + ip_prefix_values: Optional[list[str]] = None, + ip_group_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ - :keyword type: IP Address type. Known values are: "SourceIP" and "DestinationIP". + :keyword type: IP Address type that needs to be matched. Known values are: "SourceIP" and + "DestinationIP". :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType - :keyword prefix_type: IP Prefix Type. Known values are: "Prefix" and "LongestPrefix". + :keyword prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and + "LongestPrefix". :paramtype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType - :keyword ip_prefix_values: The list of IP Prefixes. + :keyword ip_prefix_values: The list of IP Prefixes that need to be matched. :paramtype ip_prefix_values: list[str] :keyword ip_group_names: The List of IP Group Names that need to be matched. :paramtype ip_group_names: list[str] @@ -5194,12 +5174,12 @@ def __init__( self.ip_group_names = ip_group_names -class IpPrefix(TrackedResource): # pylint: disable=too-many-instance-attributes +class IpPrefix(TrackedResource): """The IP Prefix resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -5222,7 +5202,7 @@ class IpPrefix(TrackedResource): # pylint: disable=too-many-instance-attributes :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5262,9 +5242,9 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, - ip_prefix_rules: Optional[List["_models.IpPrefixRule"]] = None, + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, **kwargs: Any ) -> None: """ @@ -5280,9 +5260,9 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.ip_prefix_rules = ip_prefix_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class IpPrefixesListResult(_serialization.Model): @@ -5300,7 +5280,7 @@ class IpPrefixesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.IpPrefix"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.IpPrefix"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of IP Prefix resources. @@ -5333,9 +5313,9 @@ class IpPrefixPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, - ip_prefix_rules: Optional[List["_models.IpPrefixRule"]] = None, + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, **kwargs: Any ) -> None: """ @@ -5362,7 +5342,7 @@ class IpPrefixPatchableProperties(_serialization.Model): "ip_prefix_rules": {"key": "ipPrefixRules", "type": "[IpPrefixRule]"}, } - def __init__(self, *, ip_prefix_rules: Optional[List["_models.IpPrefixRule"]] = None, **kwargs: Any) -> None: + def __init__(self, *, ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, **kwargs: Any) -> None: """ :keyword ip_prefix_rules: The list of IP Prefix Rules. :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] @@ -5388,7 +5368,7 @@ class IpPrefixPatchProperties(AnnotationResource, IpPrefixPatchableProperties): def __init__( self, *, - ip_prefix_rules: Optional[List["_models.IpPrefixRule"]] = None, + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -5414,7 +5394,7 @@ class IpPrefixProperties(AnnotationResource, IpPrefixPatchableProperties): :vartype annotation: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5442,7 +5422,7 @@ class IpPrefixProperties(AnnotationResource, IpPrefixPatchableProperties): def __init__( self, *, - ip_prefix_rules: Optional[List["_models.IpPrefixRule"]] = None, + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -5454,16 +5434,16 @@ def __init__( """ super().__init__(annotation=annotation, ip_prefix_rules=ip_prefix_rules, **kwargs) self.ip_prefix_rules = ip_prefix_rules - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation class IpPrefixRule(_serialization.Model): """IP Prefix Rule properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: "Permit" and "Deny". @@ -5553,7 +5533,7 @@ def __init__( self, *, encapsulation: Optional[Union[str, "_models.Encapsulation"]] = None, - neighbor_group_ids: Optional[List[str]] = None, + neighbor_group_ids: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -5567,12 +5547,12 @@ def __init__( self.neighbor_group_ids = neighbor_group_ids -class L2IsolationDomain(TrackedResource): # pylint: disable=too-many-instance-attributes +class L2IsolationDomain(TrackedResource): """The L2 Isolation Domain resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -5599,7 +5579,7 @@ class L2IsolationDomain(TrackedResource): # pylint: disable=too-many-instance-a :vartype mtu: int :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5646,7 +5626,7 @@ def __init__( location: str, network_fabric_id: str, vlan_id: int, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any @@ -5670,9 +5650,9 @@ def __init__( self.network_fabric_id = network_fabric_id self.vlan_id = vlan_id self.mtu = mtu - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class L2IsolationDomainPatch(TagsUpdate): @@ -5697,7 +5677,7 @@ class L2IsolationDomainPatch(TagsUpdate): } def __init__( - self, *, tags: Optional[Dict[str, str]] = None, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any + self, *, tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any ) -> None: """ :keyword tags: Resource tags. @@ -5746,7 +5726,7 @@ class L2IsolationDomainProperties(AnnotationResource): 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. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -5758,7 +5738,7 @@ class L2IsolationDomainProperties(AnnotationResource): :vartype mtu: int :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5805,9 +5785,9 @@ def __init__( self.network_fabric_id = network_fabric_id self.vlan_id = vlan_id self.mtu = mtu - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class L2IsolationDomainsListResult(_serialization.Model): @@ -5827,7 +5807,7 @@ class L2IsolationDomainsListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.L2IsolationDomain"]] = None, + value: Optional[list["_models.L2IsolationDomain"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -5874,12 +5854,12 @@ def __init__( self.export_ipv6_route_policy_id = export_ipv6_route_policy_id -class L3IsolationDomain(TrackedResource): # pylint: disable=too-many-instance-attributes +class L3IsolationDomain(TrackedResource): """The L3 Isolation Domain resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -5916,7 +5896,7 @@ class L3IsolationDomain(TrackedResource): # pylint: disable=too-many-instance-a :vartype network_fabric_id: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -5968,7 +5948,7 @@ def __init__( *, location: str, network_fabric_id: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", @@ -6007,9 +5987,9 @@ def __init__( self.aggregate_route_configuration = aggregate_route_configuration self.connected_subnet_route_policy = connected_subnet_route_policy self.network_fabric_id = network_fabric_id - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class L3IsolationDomainPatch(TagsUpdate): @@ -6053,7 +6033,7 @@ class L3IsolationDomainPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", @@ -6224,7 +6204,7 @@ class L3IsolationDomainProperties(AnnotationResource, L3IsolationDomainPatchable 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. + All required parameters must be populated in order to send to server. :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known values are: "True" and "False". @@ -6246,7 +6226,7 @@ class L3IsolationDomainProperties(AnnotationResource, L3IsolationDomainPatchable :vartype network_fabric_id: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -6320,9 +6300,9 @@ def __init__( self.aggregate_route_configuration = aggregate_route_configuration self.connected_subnet_route_policy = connected_subnet_route_policy self.network_fabric_id = network_fabric_id - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation @@ -6343,7 +6323,7 @@ class L3IsolationDomainsListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.L3IsolationDomain"]] = None, + value: Optional[list["_models.L3IsolationDomain"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -6380,8 +6360,8 @@ class L3OptionBProperties(_serialization.Model): def __init__( self, *, - import_route_targets: Optional[List[str]] = None, - export_route_targets: Optional[List[str]] = None, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, route_targets: Optional["_models.RouteTargetInformation"] = None, **kwargs: Any ) -> None: @@ -6420,7 +6400,7 @@ class Layer2Configuration(_serialization.Model): "interfaces": {"key": "interfaces", "type": "[str]"}, } - def __init__(self, *, mtu: int = 1500, interfaces: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, mtu: int = 1500, interfaces: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword mtu: MTU of the packets between PE & CE. :paramtype mtu: int @@ -6458,7 +6438,7 @@ def __init__(self, *, name: Optional[str] = None, location: Optional[str] = None self.location = location -class ManagementNetworkConfigurationPatchableProperties(_serialization.Model): +class ManagementNetworkConfigurationPatchableProperties(_serialization.Model): # pylint: disable=name-too-long """Configuration to be used to setup the management network. :ivar infrastructure_vpn_configuration: VPN Configuration properties. @@ -6503,7 +6483,7 @@ def __init__( class ManagementNetworkConfigurationProperties(_serialization.Model): """Configuration to be used to setup the management network. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar infrastructure_vpn_configuration: VPN Configuration properties. Required. :vartype infrastructure_vpn_configuration: @@ -6555,7 +6535,7 @@ class NeighborAddress(_serialization.Model): :vartype address: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState """ @@ -6576,15 +6556,15 @@ def __init__(self, *, address: Optional[str] = None, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.address = address - self.configuration_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None -class NeighborGroup(TrackedResource): # pylint: disable=too-many-instance-attributes +class NeighborGroup(TrackedResource): """Defines the Neighbor Group. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -6643,7 +6623,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, destination: Optional["_models.NeighborGroupDestination"] = None, **kwargs: Any @@ -6661,9 +6641,9 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.destination = destination - self.network_tap_ids = None - self.network_tap_rule_ids = None - self.provisioning_state = None + self.network_tap_ids: Optional[list[str]] = None + self.network_tap_rule_ids: Optional[list[str]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NeighborGroupDestination(_serialization.Model): @@ -6686,7 +6666,7 @@ class NeighborGroupDestination(_serialization.Model): } def __init__( - self, *, ipv4_addresses: Optional[List[str]] = None, ipv6_addresses: Optional[List[str]] = None, **kwargs: Any + self, *, ipv4_addresses: Optional[list[str]] = None, ipv6_addresses: Optional[list[str]] = None, **kwargs: Any ) -> None: """ :keyword ipv4_addresses: Array of IPv4 Addresses. @@ -6719,7 +6699,7 @@ class NeighborGroupPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, destination: Optional["_models.NeighborGroupDestination"] = None, **kwargs: Any @@ -6836,9 +6816,9 @@ def __init__( """ super().__init__(annotation=annotation, destination=destination, **kwargs) self.destination = destination - self.network_tap_ids = None - self.network_tap_rule_ids = None - self.provisioning_state = None + self.network_tap_ids: Optional[list[str]] = None + self.network_tap_rule_ids: Optional[list[str]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.annotation = annotation @@ -6857,7 +6837,7 @@ class NeighborGroupsListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NeighborGroup"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NeighborGroup"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of Neighbor Group resources. @@ -6870,12 +6850,12 @@ def __init__( self.next_link = next_link -class NetworkDevice(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkDevice(TrackedResource): """The Network Device resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -6914,7 +6894,7 @@ class NetworkDevice(TrackedResource): # pylint: disable=too-many-instance-attri :vartype management_ipv6_address: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -6968,7 +6948,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, host_name: Optional[str] = None, serial_number: Optional[str] = None, @@ -6994,15 +6974,15 @@ def __init__( self.annotation = annotation self.host_name = host_name self.serial_number = serial_number - self.version = None + self.version: Optional[str] = None self.network_device_sku = network_device_sku - self.network_device_role = None - self.network_rack_id = None - self.management_ipv4_address = None - self.management_ipv6_address = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.network_device_role: Optional[Union[str, "_models.NetworkDeviceRole"]] = None + self.network_rack_id: Optional[str] = None + self.management_ipv4_address: Optional[str] = None + self.management_ipv6_address: Optional[str] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkDevicePatchableProperties(_serialization.Model): @@ -7067,7 +7047,7 @@ class NetworkDevicePatchParameters(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, host_name: Optional[str] = None, serial_number: Optional[str] = None, @@ -7136,9 +7116,7 @@ def __init__( self.annotation = annotation -class NetworkDeviceProperties( - AnnotationResource, NetworkDevicePatchableProperties -): # pylint: disable=too-many-instance-attributes +class NetworkDeviceProperties(AnnotationResource, NetworkDevicePatchableProperties): """Network Device Properties defines the properties of the resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -7165,7 +7143,7 @@ class NetworkDeviceProperties( :vartype management_ipv6_address: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -7227,15 +7205,15 @@ def __init__( super().__init__(annotation=annotation, host_name=host_name, serial_number=serial_number, **kwargs) self.host_name = host_name self.serial_number = serial_number - self.version = None + self.version: Optional[str] = None self.network_device_sku = network_device_sku - self.network_device_role = None - self.network_rack_id = None - self.management_ipv4_address = None - self.management_ipv6_address = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.network_device_role: Optional[Union[str, "_models.NetworkDeviceRole"]] = None + self.network_rack_id: Optional[str] = None + self.management_ipv4_address: Optional[str] = None + self.management_ipv6_address: Optional[str] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation @@ -7244,7 +7222,7 @@ class NetworkDeviceSku(ProxyResource): 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -7301,9 +7279,9 @@ def __init__( *, model: str, manufacturer: Optional[str] = None, - supported_versions: Optional[List["_models.SupportedVersionProperties"]] = None, - supported_role_types: Optional[List[Union[str, "_models.NetworkDeviceRoleName"]]] = None, - interfaces: Optional[List["_models.DeviceInterfaceProperties"]] = None, + supported_versions: Optional[list["_models.SupportedVersionProperties"]] = None, + supported_role_types: Optional[list[Union[str, "_models.NetworkDeviceRoleName"]]] = None, + interfaces: Optional[list["_models.DeviceInterfaceProperties"]] = None, **kwargs: Any ) -> None: """ @@ -7326,7 +7304,7 @@ def __init__( self.supported_versions = supported_versions self.supported_role_types = supported_role_types self.interfaces = interfaces - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkDeviceSkusListResult(_serialization.Model): @@ -7346,7 +7324,7 @@ class NetworkDeviceSkusListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkDeviceSku"]] = None, + value: Optional[list["_models.NetworkDeviceSku"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -7376,7 +7354,7 @@ class NetworkDevicesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkDevice"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NetworkDevice"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of NetworkDevice resources. @@ -7389,12 +7367,12 @@ def __init__( self.next_link = next_link -class NetworkFabric(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkFabric(TrackedResource): """The Network Fabric resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -7451,7 +7429,7 @@ class NetworkFabric(TrackedResource): # pylint: disable=too-many-instance-attri :vartype l3_isolation_domains: list[str] :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on @@ -7471,7 +7449,7 @@ class NetworkFabric(TrackedResource): # pylint: disable=too-many-instance-attri "system_data": {"readonly": True}, "location": {"required": True}, "network_fabric_sku": {"required": True, "min_length": 1}, - "fabric_version": {"readonly": True}, + "fabric_version": {"min_length": 1}, "router_ids": {"readonly": True}, "network_fabric_controller_id": {"required": True}, "rack_count": {"maximum": 8, "minimum": 1}, @@ -7522,7 +7500,7 @@ class NetworkFabric(TrackedResource): # pylint: disable=too-many-instance-attri "administrative_state": {"key": "properties.administrativeState", "type": "str"}, } - def __init__( # pylint: disable=too-many-locals + def __init__( self, *, location: str, @@ -7533,8 +7511,9 @@ def __init__( # pylint: disable=too-many-locals fabric_asn: int, terminal_server_configuration: "_models.TerminalServerConfiguration", management_network_configuration: "_models.ManagementNetworkConfigurationProperties", - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, + fabric_version: Optional[str] = None, rack_count: Optional[int] = None, ipv6_prefix: Optional[str] = None, **kwargs: Any @@ -7550,6 +7529,8 @@ def __init__( # pylint: disable=too-many-locals Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. Required. :paramtype network_fabric_sku: str + :keyword fabric_version: The version of Network Fabric. + :paramtype fabric_version: str :keyword network_fabric_controller_id: Azure resource ID for the NetworkFabricController the NetworkFabric belongs. Required. :paramtype network_fabric_controller_id: str @@ -7575,8 +7556,8 @@ def __init__( # pylint: disable=too-many-locals super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.network_fabric_sku = network_fabric_sku - self.fabric_version = None - self.router_ids = None + self.fabric_version = fabric_version + self.router_ids: Optional[list[str]] = None self.network_fabric_controller_id = network_fabric_controller_id self.rack_count = rack_count self.server_count_per_rack = server_count_per_rack @@ -7585,20 +7566,20 @@ def __init__( # pylint: disable=too-many-locals self.fabric_asn = fabric_asn self.terminal_server_configuration = terminal_server_configuration self.management_network_configuration = management_network_configuration - self.racks = None - self.l2_isolation_domains = None - self.l3_isolation_domains = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.racks: Optional[list[str]] = None + self.l2_isolation_domains: Optional[list[str]] = None + self.l3_isolation_domains: Optional[list[str]] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None -class NetworkFabricController(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkFabricController(TrackedResource): """The Network Fabric Controller resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -7719,10 +7700,10 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, - infrastructure_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = None, is_workload_management_network_enabled: Union[str, "_models.IsWorkloadManagementNetworkEnabled"] = "True", ipv4_address_space: str = "10.0.0.0/19", @@ -7768,17 +7749,17 @@ def __init__( self.annotation = annotation self.infrastructure_express_route_connections = infrastructure_express_route_connections self.workload_express_route_connections = workload_express_route_connections - self.infrastructure_services = None - self.workload_services = None + self.infrastructure_services: Optional["_models.ControllerServices"] = None + self.workload_services: Optional["_models.ControllerServices"] = None self.managed_resource_group_configuration = managed_resource_group_configuration - self.network_fabric_ids = None - self.workload_management_network = None + self.network_fabric_ids: Optional[list[str]] = None + self.workload_management_network: Optional[bool] = None self.is_workload_management_network_enabled = is_workload_management_network_enabled - self.tenant_internet_gateway_ids = None + self.tenant_internet_gateway_ids: Optional[list[str]] = None self.ipv4_address_space = ipv4_address_space self.ipv6_address_space = ipv6_address_space self.nfc_sku = nfc_sku - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkFabricControllerPatch(TagsUpdate): @@ -7813,9 +7794,9 @@ class NetworkFabricControllerPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - infrastructure_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, + tags: Optional[dict[str, str]] = None, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, **kwargs: Any ) -> None: """ @@ -7837,7 +7818,7 @@ def __init__( self.workload_express_route_connections = workload_express_route_connections -class NetworkFabricControllerPatchableProperties(_serialization.Model): +class NetworkFabricControllerPatchableProperties(_serialization.Model): # pylint: disable=name-too-long """Network Fabric Controller updatable properties. :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure @@ -7866,8 +7847,8 @@ class NetworkFabricControllerPatchableProperties(_serialization.Model): def __init__( self, *, - infrastructure_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, **kwargs: Any ) -> None: """ @@ -7887,9 +7868,7 @@ def __init__( self.workload_express_route_connections = workload_express_route_connections -class NetworkFabricControllerProperties( - AnnotationResource, NetworkFabricControllerPatchableProperties -): # pylint: disable=too-many-instance-attributes +class NetworkFabricControllerProperties(AnnotationResource, NetworkFabricControllerPatchableProperties): """NetworkFabricControllerProperties defines the resource properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -7983,8 +7962,8 @@ class NetworkFabricControllerProperties( def __init__( self, *, - infrastructure_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[List["_models.ExpressRouteConnectionInformation"]] = None, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, annotation: Optional[str] = None, managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = None, is_workload_management_network_enabled: Union[str, "_models.IsWorkloadManagementNetworkEnabled"] = "True", @@ -8031,17 +8010,17 @@ def __init__( ) self.infrastructure_express_route_connections = infrastructure_express_route_connections self.workload_express_route_connections = workload_express_route_connections - self.infrastructure_services = None - self.workload_services = None + self.infrastructure_services: Optional["_models.ControllerServices"] = None + self.workload_services: Optional["_models.ControllerServices"] = None self.managed_resource_group_configuration = managed_resource_group_configuration - self.network_fabric_ids = None - self.workload_management_network = None + self.network_fabric_ids: Optional[list[str]] = None + self.workload_management_network: Optional[bool] = None self.is_workload_management_network_enabled = is_workload_management_network_enabled - self.tenant_internet_gateway_ids = None + self.tenant_internet_gateway_ids: Optional[list[str]] = None self.ipv4_address_space = ipv4_address_space self.ipv6_address_space = ipv6_address_space self.nfc_sku = nfc_sku - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.annotation = annotation @@ -8062,7 +8041,7 @@ class NetworkFabricControllersListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkFabricController"]] = None, + value: Optional[list["_models.NetworkFabricController"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -8133,7 +8112,7 @@ class NetworkFabricPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, rack_count: Optional[int] = None, server_count_per_rack: Optional[int] = None, @@ -8319,7 +8298,7 @@ def __init__( class NetworkFabricPatchablePropertiesTerminalServerConfiguration( TerminalServerPatchableProperties, Layer3IpPrefixProperties -): +): # pylint: disable=name-too-long """Network and credentials configuration already applied to terminal server. :ivar primary_ipv4_prefix: IPv4 Address Prefix. @@ -8509,12 +8488,12 @@ def __init__( self.annotation = annotation -class NetworkFabricProperties(AnnotationResource): # pylint: disable=too-many-instance-attributes +class NetworkFabricProperties(AnnotationResource): """Network Fabric Properties defines the properties of the 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. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -8556,7 +8535,7 @@ class NetworkFabricProperties(AnnotationResource): # pylint: disable=too-many-i :vartype l3_isolation_domains: list[str] :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on @@ -8571,7 +8550,7 @@ class NetworkFabricProperties(AnnotationResource): # pylint: disable=too-many-i _validation = { "network_fabric_sku": {"required": True, "min_length": 1}, - "fabric_version": {"readonly": True}, + "fabric_version": {"min_length": 1}, "router_ids": {"readonly": True}, "network_fabric_controller_id": {"required": True}, "rack_count": {"maximum": 8, "minimum": 1}, @@ -8624,6 +8603,7 @@ def __init__( terminal_server_configuration: "_models.TerminalServerConfiguration", management_network_configuration: "_models.ManagementNetworkConfigurationProperties", annotation: Optional[str] = None, + fabric_version: Optional[str] = None, rack_count: Optional[int] = None, ipv6_prefix: Optional[str] = None, **kwargs: Any @@ -8635,6 +8615,8 @@ def __init__( Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. Required. :paramtype network_fabric_sku: str + :keyword fabric_version: The version of Network Fabric. + :paramtype fabric_version: str :keyword network_fabric_controller_id: Azure resource ID for the NetworkFabricController the NetworkFabric belongs. Required. :paramtype network_fabric_controller_id: str @@ -8659,8 +8641,8 @@ def __init__( """ super().__init__(annotation=annotation, **kwargs) self.network_fabric_sku = network_fabric_sku - self.fabric_version = None - self.router_ids = None + self.fabric_version = fabric_version + self.router_ids: Optional[list[str]] = None self.network_fabric_controller_id = network_fabric_controller_id self.rack_count = rack_count self.server_count_per_rack = server_count_per_rack @@ -8669,12 +8651,12 @@ def __init__( self.fabric_asn = fabric_asn self.terminal_server_configuration = terminal_server_configuration self.management_network_configuration = management_network_configuration - self.racks = None - self.l2_isolation_domains = None - self.l3_isolation_domains = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.racks: Optional[list[str]] = None + self.l2_isolation_domains: Optional[list[str]] = None + self.l3_isolation_domains: Optional[list[str]] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkFabricSku(ProxyResource): @@ -8745,12 +8727,12 @@ def __init__( :paramtype maximum_server_count: int """ super().__init__(**kwargs) - self.type_properties_type = None + self.type_properties_type: Optional[Union[str, "_models.FabricSkuType"]] = None self.max_compute_racks = max_compute_racks self.maximum_server_count = maximum_server_count - self.supported_versions = None - self.details = None - self.provisioning_state = None + self.supported_versions: Optional[list[str]] = None + self.details: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkFabricSkusListResult(_serialization.Model): @@ -8770,7 +8752,7 @@ class NetworkFabricSkusListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkFabricSku"]] = None, + value: Optional[list["_models.NetworkFabricSku"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -8800,7 +8782,7 @@ class NetworkFabricsListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkFabric"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NetworkFabric"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of Network Fabric resources. @@ -8813,7 +8795,7 @@ def __init__( self.next_link = next_link -class NetworkInterface(ProxyResource): # pylint: disable=too-many-instance-attributes +class NetworkInterface(ProxyResource): """Defines the NetworkInterface resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -8887,13 +8869,13 @@ def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.annotation = annotation - self.physical_identifier = None - self.connected_to = None - self.interface_type = None - self.ipv4_address = None - self.ipv6_address = None - self.provisioning_state = None - self.administrative_state = None + self.physical_identifier: Optional[str] = None + self.connected_to: Optional[str] = None + self.interface_type: Optional[Union[str, "_models.InterfaceType"]] = None + self.ipv4_address: Optional[str] = None + self.ipv6_address: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkInterfacePatch(_serialization.Model): @@ -8923,17 +8905,6 @@ class NetworkInterfacePatchProperties(AnnotationResource): :vartype annotation: str """ - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, **kwargs) - class NetworkInterfaceProperties(AnnotationResource): """Network Interface Properties defines the properties of the resource. @@ -8989,13 +8960,13 @@ def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: :paramtype annotation: str """ super().__init__(annotation=annotation, **kwargs) - self.physical_identifier = None - self.connected_to = None - self.interface_type = None - self.ipv4_address = None - self.ipv6_address = None - self.provisioning_state = None - self.administrative_state = None + self.physical_identifier: Optional[str] = None + self.connected_to: Optional[str] = None + self.interface_type: Optional[Union[str, "_models.InterfaceType"]] = None + self.ipv4_address: Optional[str] = None + self.ipv6_address: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkInterfacesList(_serialization.Model): @@ -9015,7 +8986,7 @@ class NetworkInterfacesList(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkInterface"]] = None, + value: Optional[list["_models.NetworkInterface"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -9030,12 +9001,12 @@ def __init__( self.next_link = next_link -class NetworkPacketBroker(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkPacketBroker(TrackedResource): """The NetworkPacketBroker resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -9098,7 +9069,7 @@ class NetworkPacketBroker(TrackedResource): # pylint: disable=too-many-instance } def __init__( - self, *, location: str, network_fabric_id: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any + self, *, location: str, network_fabric_id: str, tags: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ :keyword tags: Resource tags. @@ -9110,11 +9081,11 @@ def __init__( """ super().__init__(tags=tags, location=location, **kwargs) self.network_fabric_id = network_fabric_id - self.network_device_ids = None - self.source_interface_ids = None - self.network_tap_ids = None - self.neighbor_group_ids = None - self.provisioning_state = None + self.network_device_ids: Optional[list[str]] = None + self.source_interface_ids: Optional[list[str]] = None + self.network_tap_ids: Optional[list[str]] = None + self.neighbor_group_ids: Optional[list[str]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkPacketBrokerPatch(TagsUpdate): @@ -9124,17 +9095,6 @@ class NetworkPacketBrokerPatch(TagsUpdate): :vartype tags: dict[str, str] """ - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(tags=tags, **kwargs) - class NetworkPacketBrokersListResult(_serialization.Model): """List of NetworkPacketBrokers. @@ -9153,7 +9113,7 @@ class NetworkPacketBrokersListResult(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkPacketBroker"]] = None, + value: Optional[list["_models.NetworkPacketBroker"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -9168,12 +9128,12 @@ def __init__( self.next_link = next_link -class NetworkRack(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkRack(TrackedResource): """The Network Rack resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -9234,7 +9194,7 @@ def __init__( *, location: str, network_fabric_id: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, network_rack_type: Optional[Union[str, "_models.NetworkRackType"]] = None, **kwargs: Any @@ -9256,8 +9216,8 @@ def __init__( self.annotation = annotation self.network_rack_type = network_rack_type self.network_fabric_id = network_fabric_id - self.network_devices = None - self.provisioning_state = None + self.network_devices: Optional[list[str]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkRackProperties(AnnotationResource): @@ -9265,7 +9225,7 @@ class NetworkRackProperties(AnnotationResource): 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. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -9315,8 +9275,8 @@ def __init__( super().__init__(annotation=annotation, **kwargs) self.network_rack_type = network_rack_type self.network_fabric_id = network_fabric_id - self.network_devices = None - self.provisioning_state = None + self.network_devices: Optional[list[str]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None class NetworkRacksListResult(_serialization.Model): @@ -9334,7 +9294,7 @@ class NetworkRacksListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkRack"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NetworkRack"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of Network Rack resources. @@ -9347,12 +9307,12 @@ def __init__( self.next_link = next_link -class NetworkTap(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkTap(TrackedResource): """The Network Tap resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -9382,7 +9342,8 @@ class NetworkTap(TrackedResource): # pylint: disable=too-many-instance-attribut :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType :ivar configuration_state: Gets the configurations state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", - "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", + and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on @@ -9431,8 +9392,8 @@ def __init__( *, location: str, network_packet_broker_id: str, - destinations: List["_models.NetworkTapPropertiesDestinationsItem"], - tags: Optional[Dict[str, str]] = None, + destinations: list["_models.NetworkTapPropertiesDestinationsItem"], + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, polling_type: Optional[Union[str, "_models.PollingType"]] = None, **kwargs: Any @@ -9455,12 +9416,12 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation self.network_packet_broker_id = network_packet_broker_id - self.source_tap_rule_id = None + self.source_tap_rule_id: Optional[str] = None self.destinations = destinations self.polling_type = polling_type - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkTapPatch(TagsUpdate): @@ -9487,10 +9448,10 @@ class NetworkTapPatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, polling_type: Optional[Union[str, "_models.PollingType"]] = None, - destinations: Optional[List["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, + destinations: Optional[list["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, **kwargs: Any ) -> None: """ @@ -9533,7 +9494,7 @@ def __init__( *, annotation: Optional[str] = None, polling_type: Optional[Union[str, "_models.PollingType"]] = None, - destinations: Optional[List["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, + destinations: Optional[list["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, **kwargs: Any ) -> None: """ @@ -9550,7 +9511,7 @@ def __init__( self.destinations = destinations -class NetworkTapPatchableParametersDestinationsItem(DestinationProperties): +class NetworkTapPatchableParametersDestinationsItem(DestinationProperties): # pylint: disable=name-too-long """Destination. :ivar name: Destination name. @@ -9568,60 +9529,13 @@ class NetworkTapPatchableParametersDestinationsItem(DestinationProperties): :vartype destination_tap_rule_id: str """ - _validation = { - "name": {"min_length": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "destination_type": {"key": "destinationType", "type": "str"}, - "destination_id": {"key": "destinationId", "type": "str"}, - "isolation_domain_properties": {"key": "isolationDomainProperties", "type": "IsolationDomainProperties"}, - "destination_tap_rule_id": {"key": "destinationTapRuleId", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - destination_type: Optional[Union[str, "_models.DestinationType"]] = None, - destination_id: Optional[str] = None, - isolation_domain_properties: Optional["_models.IsolationDomainProperties"] = None, - destination_tap_rule_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Destination name. - :paramtype name: str - :keyword destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :paramtype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :keyword destination_id: The destination Id. ARM Resource ID of either NNI or Internal - Networks. - :paramtype destination_id: str - :keyword isolation_domain_properties: Isolation Domain Properties. - :paramtype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :keyword destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :paramtype destination_tap_rule_id: str - """ - super().__init__( - name=name, - destination_type=destination_type, - destination_id=destination_id, - isolation_domain_properties=isolation_domain_properties, - destination_tap_rule_id=destination_tap_rule_id, - **kwargs - ) - class NetworkTapProperties(AnnotationResource): """Network Tap Properties defines the properties of the 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. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -9636,7 +9550,8 @@ class NetworkTapProperties(AnnotationResource): :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType :ivar configuration_state: Gets the configurations state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", - "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", + and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on @@ -9673,7 +9588,7 @@ def __init__( self, *, network_packet_broker_id: str, - destinations: List["_models.NetworkTapPropertiesDestinationsItem"], + destinations: list["_models.NetworkTapPropertiesDestinationsItem"], annotation: Optional[str] = None, polling_type: Optional[Union[str, "_models.PollingType"]] = None, **kwargs: Any @@ -9691,12 +9606,12 @@ def __init__( """ super().__init__(annotation=annotation, **kwargs) self.network_packet_broker_id = network_packet_broker_id - self.source_tap_rule_id = None + self.source_tap_rule_id: Optional[str] = None self.destinations = destinations self.polling_type = polling_type - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkTapPropertiesDestinationsItem(DestinationProperties): @@ -9717,60 +9632,13 @@ class NetworkTapPropertiesDestinationsItem(DestinationProperties): :vartype destination_tap_rule_id: str """ - _validation = { - "name": {"min_length": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "destination_type": {"key": "destinationType", "type": "str"}, - "destination_id": {"key": "destinationId", "type": "str"}, - "isolation_domain_properties": {"key": "isolationDomainProperties", "type": "IsolationDomainProperties"}, - "destination_tap_rule_id": {"key": "destinationTapRuleId", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - destination_type: Optional[Union[str, "_models.DestinationType"]] = None, - destination_id: Optional[str] = None, - isolation_domain_properties: Optional["_models.IsolationDomainProperties"] = None, - destination_tap_rule_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Destination name. - :paramtype name: str - :keyword destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :paramtype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :keyword destination_id: The destination Id. ARM Resource ID of either NNI or Internal - Networks. - :paramtype destination_id: str - :keyword isolation_domain_properties: Isolation Domain Properties. - :paramtype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :keyword destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :paramtype destination_tap_rule_id: str - """ - super().__init__( - name=name, - destination_type=destination_type, - destination_id=destination_id, - isolation_domain_properties=isolation_domain_properties, - destination_tap_rule_id=destination_tap_rule_id, - **kwargs - ) - -class NetworkTapRule(TrackedResource): # pylint: disable=too-many-instance-attributes +class NetworkTapRule(TrackedResource): """The NetworkTapRule resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -9810,7 +9678,7 @@ class NetworkTapRule(TrackedResource): # pylint: disable=too-many-instance-attr :vartype last_synced_time: ~datetime.datetime :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -9864,12 +9732,12 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, tap_rules_url: Optional[str] = None, - match_configurations: Optional[List["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, polling_interval_in_seconds: Union[int, "_models.PollingIntervalInSeconds"] = 30, **kwargs: Any ) -> None: @@ -9902,12 +9770,12 @@ def __init__( self.tap_rules_url = tap_rules_url self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations - self.network_tap_id = None + self.network_tap_id: Optional[str] = None self.polling_interval_in_seconds = polling_interval_in_seconds - self.last_synced_time = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.last_synced_time: Optional[datetime.datetime] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class NetworkTapRuleAction(_serialization.Model): @@ -9989,7 +9857,8 @@ class NetworkTapRuleMatchCondition(CommonMatchConditions): :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition :ivar ip_condition: IP condition that needs to be matched. :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :ivar encapsulation_type: Encapsulation Type. Known values are: "None" and "GTPv1". + :ivar encapsulation_type: Encapsulation Type that needs to be matched. Known values are: "None" + and "GTPv1". :vartype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType :ivar port_condition: Defines the port condition that needs to be matched. :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.PortCondition @@ -10010,7 +9879,7 @@ class NetworkTapRuleMatchCondition(CommonMatchConditions): def __init__( self, *, - protocol_types: Optional[List[str]] = None, + protocol_types: Optional[list[str]] = None, vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, ip_condition: Optional["_models.IpMatchCondition"] = None, encapsulation_type: Union[str, "_models.EncapsulationType"] = "None", @@ -10024,7 +9893,8 @@ def __init__( :paramtype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition :keyword ip_condition: IP condition that needs to be matched. :paramtype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :keyword encapsulation_type: Encapsulation Type. Known values are: "None" and "GTPv1". + :keyword encapsulation_type: Encapsulation Type that needs to be matched. Known values are: + "None" and "GTPv1". :paramtype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType :keyword port_condition: Defines the port condition that needs to be matched. :paramtype port_condition: ~azure.mgmt.managednetworkfabric.models.PortCondition @@ -10076,8 +9946,8 @@ def __init__( match_configuration_name: Optional[str] = None, sequence_number: Optional[int] = None, ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - match_conditions: Optional[List["_models.NetworkTapRuleMatchCondition"]] = None, - actions: Optional[List["_models.NetworkTapRuleAction"]] = None, + match_conditions: Optional[list["_models.NetworkTapRuleMatchCondition"]] = None, + actions: Optional[list["_models.NetworkTapRuleAction"]] = None, **kwargs: Any ) -> None: """ @@ -10143,12 +10013,12 @@ class NetworkTapRulePatch(TagsUpdate): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, tap_rules_url: Optional[str] = None, - match_configurations: Optional[List["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, **kwargs: Any ) -> None: """ @@ -10213,8 +10083,8 @@ def __init__( *, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, tap_rules_url: Optional[str] = None, - match_configurations: Optional[List["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, **kwargs: Any ) -> None: """ @@ -10277,8 +10147,8 @@ def __init__( *, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, tap_rules_url: Optional[str] = None, - match_configurations: Optional[List["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, annotation: Optional[str] = None, **kwargs: Any ) -> None: @@ -10312,9 +10182,7 @@ def __init__( self.annotation = annotation -class NetworkTapRuleProperties( - AnnotationResource, NetworkTapRulePatchableProperties -): # pylint: disable=too-many-instance-attributes +class NetworkTapRuleProperties(AnnotationResource, NetworkTapRulePatchableProperties): """Network Tap Rule Properties defines the resource properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -10342,7 +10210,7 @@ class NetworkTapRuleProperties( :vartype last_synced_time: ~datetime.datetime :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -10386,8 +10254,8 @@ def __init__( *, configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, tap_rules_url: Optional[str] = None, - match_configurations: Optional[List["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[List["_models.CommonDynamicMatchConfiguration"]] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, annotation: Optional[str] = None, polling_interval_in_seconds: Union[int, "_models.PollingIntervalInSeconds"] = 30, **kwargs: Any @@ -10423,12 +10291,12 @@ def __init__( self.tap_rules_url = tap_rules_url self.match_configurations = match_configurations self.dynamic_match_configurations = dynamic_match_configurations - self.network_tap_id = None + self.network_tap_id: Optional[str] = None self.polling_interval_in_seconds = polling_interval_in_seconds - self.last_synced_time = None - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.last_synced_time: Optional[datetime.datetime] = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation @@ -10447,7 +10315,7 @@ class NetworkTapRulesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkTapRule"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NetworkTapRule"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of NetworkTapRule resources. @@ -10475,7 +10343,7 @@ class NetworkTapsListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkTap"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.NetworkTap"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of NetworkTap resources. @@ -10488,12 +10356,12 @@ def __init__( self.next_link = next_link -class NetworkToNetworkInterconnect(ProxyResource): # pylint: disable=too-many-instance-attributes +class NetworkToNetworkInterconnect(ProxyResource): """The Network To Network Interconnect resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -10534,7 +10402,7 @@ class NetworkToNetworkInterconnect(ProxyResource): # pylint: disable=too-many-i :vartype ingress_acl_id: str :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -10638,12 +10506,12 @@ def __init__( self.export_route_policy = export_route_policy self.egress_acl_id = egress_acl_id self.ingress_acl_id = ingress_acl_id - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None -class NetworkToNetworkInterconnectPatch(ProxyResource): # pylint: disable=too-many-instance-attributes +class NetworkToNetworkInterconnectPatch(ProxyResource): """The Network To Network Interconnect resource patch definition. Variables are only populated by the server, and will be ignored when sending a request. @@ -10819,10 +10687,12 @@ def __init__( ) self.peer_asn = peer_asn self.vlan_id = vlan_id - self.fabric_asn = None + self.fabric_asn: Optional[int] = None -class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(OptionBLayer3Configuration): +class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration( + OptionBLayer3Configuration +): # pylint: disable=name-too-long """Common properties for Layer3Configuration. Variables are only populated by the server, and will be ignored when sending a request. @@ -10843,57 +10713,6 @@ class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(OptionBLa :vartype fabric_asn: int """ - _validation = { - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - "vlan_id": {"maximum": 4094, "minimum": 100}, - "fabric_asn": {"readonly": True}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - peer_asn: Optional[int] = None, - vlan_id: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. - :paramtype peer_asn: int - :keyword vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. - :paramtype vlan_id: int - """ - super().__init__( - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - peer_asn=peer_asn, - vlan_id=vlan_id, - **kwargs - ) - class NetworkToNetworkInterconnectsList(_serialization.Model): """List of Network To Network Interconnects. @@ -10912,7 +10731,7 @@ class NetworkToNetworkInterconnectsList(_serialization.Model): def __init__( self, *, - value: Optional[List["_models.NetworkToNetworkInterconnect"]] = None, + value: Optional[list["_models.NetworkToNetworkInterconnect"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: @@ -10953,8 +10772,8 @@ def __init__( self, *, bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[List["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[List["_models.StaticRouteProperties"]] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, **kwargs: Any ) -> None: """ @@ -11014,11 +10833,11 @@ def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kw :paramtype display: ~azure.mgmt.managednetworkfabric.models.OperationDisplay """ super().__init__(**kwargs) - self.name = None - self.is_data_action = None + self.name: Optional[str] = None + self.is_data_action: Optional[bool] = None self.display = display - self.origin = None - self.action_type = None + self.origin: Optional[Union[str, "_models.Origin"]] = None + self.action_type: Optional[Union[str, "_models.ActionType"]] = None class OperationDisplay(_serialization.Model): @@ -11057,10 +10876,10 @@ class OperationDisplay(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None + self.provider: Optional[str] = None + self.resource: Optional[str] = None + self.operation: Optional[str] = None + self.description: Optional[str] = None class OperationListResult(_serialization.Model): @@ -11088,8 +10907,8 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[list["_models.Operation"]] = None + self.next_link: Optional[str] = None class OptionAProperties(_serialization.Model): @@ -11166,8 +10985,8 @@ class OptionBProperties(_serialization.Model): def __init__( self, *, - import_route_targets: Optional[List[str]] = None, - export_route_targets: Optional[List[str]] = None, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, route_targets: Optional["_models.RouteTargetInformation"] = None, **kwargs: Any ) -> None: @@ -11192,7 +11011,7 @@ class PortGroupProperties(_serialization.Model): :ivar name: The name of the port group. :vartype name: str - :ivar ports: List of the ports that needs to be matched. + :ivar ports: List of the ports that need to be matched. :vartype ports: list[str] """ @@ -11206,11 +11025,11 @@ class PortGroupProperties(_serialization.Model): "ports": {"key": "ports", "type": "[str]"}, } - def __init__(self, *, name: Optional[str] = None, ports: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, name: Optional[str] = None, ports: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword name: The name of the port group. :paramtype name: str - :keyword ports: List of the ports that needs to be matched. + :keyword ports: List of the ports that need to be matched. :paramtype ports: list[str] """ super().__init__(**kwargs) @@ -11257,7 +11076,7 @@ class RoutePoliciesListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.RoutePolicy"]] = None, next_link: Optional[str] = None, **kwargs: Any + self, *, value: Optional[list["_models.RoutePolicy"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: List of RoutePolicy resources. @@ -11270,12 +11089,12 @@ def __init__( self.next_link = next_link -class RoutePolicy(TrackedResource): # pylint: disable=too-many-instance-attributes +class RoutePolicy(TrackedResource): """The RoutePolicy resource definition. 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. + All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". @@ -11294,6 +11113,9 @@ class RoutePolicy(TrackedResource): # pylint: disable=too-many-instance-attribu :vartype location: str :ivar annotation: Switch configuration description. :vartype annotation: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar statements: Route Policy statements. :vartype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] @@ -11304,7 +11126,7 @@ class RoutePolicy(TrackedResource): # pylint: disable=too-many-instance-attribu :vartype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -11335,6 +11157,7 @@ class RoutePolicy(TrackedResource): # pylint: disable=too-many-instance-attribu "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "annotation": {"key": "properties.annotation", "type": "str"}, + "default_action": {"key": "properties.defaultAction", "type": "str"}, "statements": {"key": "properties.statements", "type": "[RoutePolicyStatementProperties]"}, "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, "address_family_type": {"key": "properties.addressFamilyType", "type": "str"}, @@ -11348,9 +11171,10 @@ def __init__( *, location: str, network_fabric_id: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, - statements: Optional[List["_models.RoutePolicyStatementProperties"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, address_family_type: Union[str, "_models.AddressFamilyType"] = "IPv4", **kwargs: Any ) -> None: @@ -11361,6 +11185,9 @@ def __init__( :paramtype location: str :keyword annotation: Switch configuration description. :paramtype annotation: str + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword statements: Route Policy statements. :paramtype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] @@ -11373,12 +11200,13 @@ def __init__( """ super().__init__(tags=tags, location=location, **kwargs) self.annotation = annotation + self.default_action = default_action self.statements = statements self.network_fabric_id = network_fabric_id self.address_family_type = address_family_type - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None class RoutePolicyPatch(TagsUpdate): @@ -11386,6 +11214,9 @@ class RoutePolicyPatch(TagsUpdate): :ivar tags: Resource tags. :vartype tags: dict[str, str] + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar statements: Route Policy statements. :vartype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] @@ -11393,48 +11224,66 @@ class RoutePolicyPatch(TagsUpdate): _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, + "default_action": {"key": "properties.defaultAction", "type": "str"}, "statements": {"key": "properties.statements", "type": "[RoutePolicyStatementProperties]"}, } def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - statements: Optional[List["_models.RoutePolicyStatementProperties"]] = None, + tags: Optional[dict[str, str]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, **kwargs: Any ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword statements: Route Policy statements. :paramtype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] """ super().__init__(tags=tags, **kwargs) + self.default_action = default_action self.statements = statements class RoutePolicyPatchableProperties(_serialization.Model): """Route Policy patchable properties. + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar statements: Route Policy statements. :vartype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] """ _attribute_map = { + "default_action": {"key": "defaultAction", "type": "str"}, "statements": {"key": "statements", "type": "[RoutePolicyStatementProperties]"}, } def __init__( - self, *, statements: Optional[List["_models.RoutePolicyStatementProperties"]] = None, **kwargs: Any + self, + *, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, + **kwargs: Any ) -> None: """ + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword statements: Route Policy statements. :paramtype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] """ super().__init__(**kwargs) + self.default_action = default_action self.statements = statements @@ -11443,8 +11292,11 @@ class RoutePolicyProperties(AnnotationResource, RoutePolicyPatchableProperties): 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. + All required parameters must be populated in order to send to server. + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :ivar statements: Route Policy statements. :vartype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] @@ -11457,7 +11309,7 @@ class RoutePolicyProperties(AnnotationResource, RoutePolicyPatchableProperties): :vartype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". @@ -11476,6 +11328,7 @@ class RoutePolicyProperties(AnnotationResource, RoutePolicyPatchableProperties): } _attribute_map = { + "default_action": {"key": "defaultAction", "type": "str"}, "statements": {"key": "statements", "type": "[RoutePolicyStatementProperties]"}, "annotation": {"key": "annotation", "type": "str"}, "network_fabric_id": {"key": "networkFabricId", "type": "str"}, @@ -11489,12 +11342,16 @@ def __init__( self, *, network_fabric_id: str, - statements: Optional[List["_models.RoutePolicyStatementProperties"]] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, annotation: Optional[str] = None, address_family_type: Union[str, "_models.AddressFamilyType"] = "IPv4", **kwargs: Any ) -> None: """ + :keyword default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes :keyword statements: Route Policy statements. :paramtype statements: list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] @@ -11507,20 +11364,21 @@ def __init__( :paramtype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType """ - super().__init__(annotation=annotation, statements=statements, **kwargs) + super().__init__(annotation=annotation, default_action=default_action, statements=statements, **kwargs) + self.default_action = default_action self.statements = statements self.network_fabric_id = network_fabric_id self.address_family_type = address_family_type - self.configuration_state = None - self.provisioning_state = None - self.administrative_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.annotation = annotation class RoutePolicyStatementProperties(AnnotationResource): """Route Policy Statement properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar annotation: Switch configuration description. :vartype annotation: str @@ -11600,10 +11458,10 @@ class RouteTargetInformation(_serialization.Model): def __init__( self, *, - import_ipv4_route_targets: Optional[List[str]] = None, - import_ipv6_route_targets: Optional[List[str]] = None, - export_ipv4_route_targets: Optional[List[str]] = None, - export_ipv6_route_targets: Optional[List[str]] = None, + import_ipv4_route_targets: Optional[list[str]] = None, + import_ipv6_route_targets: Optional[list[str]] = None, + export_ipv4_route_targets: Optional[list[str]] = None, + export_ipv6_route_targets: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -11626,7 +11484,7 @@ def __init__( class RuleProperties(_serialization.Model): """Rules for the InternetGateways. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar action: Specify action. Required. Known values are: "Allow" and "Deny". :vartype action: str or ~azure.mgmt.managednetworkfabric.models.Action @@ -11644,7 +11502,7 @@ class RuleProperties(_serialization.Model): "address_list": {"key": "addressList", "type": "[str]"}, } - def __init__(self, *, action: Union[str, "_models.Action"], address_list: List[str], **kwargs: Any) -> None: + def __init__(self, *, action: Union[str, "_models.Action"], address_list: list[str], **kwargs: Any) -> None: """ :keyword action: Specify action. Required. Known values are: "Allow" and "Deny". :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.Action @@ -11659,12 +11517,12 @@ def __init__(self, *, action: Union[str, "_models.Action"], address_list: List[s class StatementActionProperties(_serialization.Model): """Route policy action properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar local_preference: Local Preference of the route policy. :vartype local_preference: int :ivar action_type: Action type. Example: Permit | Deny | Continue. Required. Known values are: - "Permit", "Deny", "Continue", and "Continue". + "Permit", "Deny", and "Continue". :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType :ivar ip_community_properties: IP Community Properties. :vartype ip_community_properties: @@ -11702,7 +11560,7 @@ def __init__( :keyword local_preference: Local Preference of the route policy. :paramtype local_preference: int :keyword action_type: Action type. Example: Permit | Deny | Continue. Required. Known values - are: "Permit", "Deny", "Continue", and "Continue". + are: "Permit", "Deny", and "Continue". :paramtype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType :keyword ip_community_properties: IP Community Properties. :paramtype ip_community_properties: @@ -11725,7 +11583,7 @@ class StatementConditionProperties(IpCommunityIdList, IpExtendedCommunityIdList) :vartype ip_extended_community_ids: list[str] :ivar ip_community_ids: List of IP Community resource IDs. :vartype ip_community_ids: list[str] - :ivar type: Type of the condition used. Known values are: "Or", "And", "Or", and "And". + :ivar type: Type of the condition used. Known values are: "Or" and "And". :vartype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType :ivar ip_prefix_id: Arm Resource Id of IpPrefix. :vartype ip_prefix_id: str @@ -11741,8 +11599,8 @@ class StatementConditionProperties(IpCommunityIdList, IpExtendedCommunityIdList) def __init__( self, *, - ip_extended_community_ids: Optional[List[str]] = None, - ip_community_ids: Optional[List[str]] = None, + ip_extended_community_ids: Optional[list[str]] = None, + ip_community_ids: Optional[list[str]] = None, type: Union[str, "_models.RoutePolicyConditionType"] = "Or", ip_prefix_id: Optional[str] = None, **kwargs: Any @@ -11752,7 +11610,7 @@ def __init__( :paramtype ip_extended_community_ids: list[str] :keyword ip_community_ids: List of IP Community resource IDs. :paramtype ip_community_ids: list[str] - :keyword type: Type of the condition used. Known values are: "Or", "And", "Or", and "And". + :keyword type: Type of the condition used. Known values are: "Or" and "And". :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType :keyword ip_prefix_id: Arm Resource Id of IpPrefix. :paramtype ip_prefix_id: str @@ -11769,7 +11627,7 @@ def __init__( class StaticRouteProperties(_serialization.Model): """Route Properties. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to server. :ivar prefix: Prefix of the route. Required. :vartype prefix: str @@ -11787,7 +11645,7 @@ class StaticRouteProperties(_serialization.Model): "next_hop": {"key": "nextHop", "type": "[str]"}, } - def __init__(self, *, prefix: str, next_hop: List[str], **kwargs: Any) -> None: + def __init__(self, *, prefix: str, next_hop: list[str], **kwargs: Any) -> None: """ :keyword prefix: Prefix of the route. Required. :paramtype prefix: str @@ -12022,7 +11880,7 @@ def __init__( self.primary_ipv6_prefix = primary_ipv6_prefix self.secondary_ipv4_prefix = secondary_ipv4_prefix self.secondary_ipv6_prefix = secondary_ipv6_prefix - self.network_device_id = None + self.network_device_id: Optional[str] = None self.username = username self.password = password self.serial_number = serial_number @@ -12045,7 +11903,7 @@ class UpdateAdministrativeState(EnableDisableOnResources): def __init__( self, *, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, state: Optional[Union[str, "_models.EnableDisableState"]] = None, **kwargs: Any ) -> None: @@ -12077,7 +11935,7 @@ class UpdateDeviceAdministrativeState(EnableDisableOnResources): def __init__( self, *, - resource_ids: Optional[List[str]] = None, + resource_ids: Optional[list[str]] = None, state: Optional[Union[str, "_models.DeviceAdministrativeState"]] = None, **kwargs: Any ) -> None: @@ -12112,6 +11970,39 @@ def __init__(self, *, version: Optional[str] = None, **kwargs: Any) -> None: self.version = version +class UpgradeNetworkFabricProperties(UpdateVersion): + """UpgradeNetworkFabricProperties. + + :ivar version: Specify the version. + :vartype version: str + :ivar action: Action to be performed while upgrading the fabric. Known values are: "Start" and + "Complete". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction + """ + + _attribute_map = { + "version": {"key": "version", "type": "str"}, + "action": {"key": "action", "type": "str"}, + } + + def __init__( + self, + *, + version: Optional[str] = None, + action: Optional[Union[str, "_models.NetworkFabricUpgradeAction"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword version: Specify the version. + :paramtype version: str + :keyword action: Action to be performed while upgrading the fabric. Known values are: "Start" + and "Complete". + :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction + """ + super().__init__(version=version, **kwargs) + self.action = action + + class ValidateConfigurationProperties(_serialization.Model): """Validation configuration properties. @@ -12145,7 +12036,7 @@ class ValidateConfigurationResponse(ErrorResponse): :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", and "DeferredControl". + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState :ivar url: URL for the details of the response. :vartype url: str @@ -12171,7 +12062,7 @@ def __init__( :paramtype url: str """ super().__init__(error=error, **kwargs) - self.configuration_state = None + self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None self.url = url @@ -12194,7 +12085,7 @@ class VlanGroupProperties(_serialization.Model): "vlans": {"key": "vlans", "type": "[str]"}, } - def __init__(self, *, name: Optional[str] = None, vlans: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, name: Optional[str] = None, vlans: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword name: Vlan group name. :paramtype name: str @@ -12207,13 +12098,13 @@ def __init__(self, *, name: Optional[str] = None, vlans: Optional[List[str]] = N class VlanMatchCondition(_serialization.Model): - """The vlan match conditions that needs to be matched. + """The vlan match conditions that need to be matched. - :ivar vlans: List of vlans that needs to be matched. + :ivar vlans: List of vlans that need to be matched. :vartype vlans: list[str] - :ivar inner_vlans: List of inner vlans that needs to be matched. + :ivar inner_vlans: List of inner vlans that need to be matched. :vartype inner_vlans: list[str] - :ivar vlan_group_names: List of vlan group names that to be matched. + :ivar vlan_group_names: List of vlan group names that need to be matched. :vartype vlan_group_names: list[str] """ @@ -12232,17 +12123,17 @@ class VlanMatchCondition(_serialization.Model): def __init__( self, *, - vlans: Optional[List[str]] = None, - inner_vlans: Optional[List[str]] = None, - vlan_group_names: Optional[List[str]] = None, + vlans: Optional[list[str]] = None, + inner_vlans: Optional[list[str]] = None, + vlan_group_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ - :keyword vlans: List of vlans that needs to be matched. + :keyword vlans: List of vlans that need to be matched. :paramtype vlans: list[str] - :keyword inner_vlans: List of inner vlans that needs to be matched. + :keyword inner_vlans: List of inner vlans that need to be matched. :paramtype inner_vlans: list[str] - :keyword vlan_group_names: List of vlan group names that to be matched. + :keyword vlan_group_names: List of vlan group names that need to be matched. :paramtype vlan_group_names: list[str] """ super().__init__(**kwargs) @@ -12304,7 +12195,9 @@ def __init__( self.option_a_properties = option_a_properties -class VpnConfigurationPatchablePropertiesOptionAProperties(OptionAProperties, Layer3IpPrefixProperties): +class VpnConfigurationPatchablePropertiesOptionAProperties( + OptionAProperties, Layer3IpPrefixProperties +): # pylint: disable=name-too-long """option A properties. :ivar primary_ipv4_prefix: IPv4 Address Prefix. @@ -12399,7 +12292,7 @@ class VpnConfigurationProperties(_serialization.Model): 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. + All required parameters must be populated in order to send to server. :ivar network_to_network_interconnect_id: ARM Resource ID of the Network To Network Interconnect. @@ -12454,13 +12347,15 @@ def __init__( """ super().__init__(**kwargs) self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.administrative_state = None + self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None self.peering_option = peering_option self.option_b_properties = option_b_properties self.option_a_properties = option_a_properties -class VpnConfigurationPropertiesOptionAProperties(OptionAProperties, Layer3IpPrefixProperties): +class VpnConfigurationPropertiesOptionAProperties( + OptionAProperties, Layer3IpPrefixProperties +): # pylint: disable=name-too-long """option A properties. :ivar primary_ipv4_prefix: IPv4 Address Prefix. diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py index 95b33173ed4b..4a911a89fb9a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py @@ -5,34 +5,40 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._access_control_lists_operations import AccessControlListsOperations -from ._internet_gateways_operations import InternetGatewaysOperations -from ._internet_gateway_rules_operations import InternetGatewayRulesOperations -from ._ip_communities_operations import IpCommunitiesOperations -from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations -from ._ip_prefixes_operations import IpPrefixesOperations -from ._l2_isolation_domains_operations import L2IsolationDomainsOperations -from ._l3_isolation_domains_operations import L3IsolationDomainsOperations -from ._internal_networks_operations import InternalNetworksOperations -from ._external_networks_operations import ExternalNetworksOperations -from ._neighbor_groups_operations import NeighborGroupsOperations -from ._network_device_skus_operations import NetworkDeviceSkusOperations -from ._network_devices_operations import NetworkDevicesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_fabric_controllers_operations import NetworkFabricControllersOperations -from ._network_fabric_skus_operations import NetworkFabricSkusOperations -from ._network_fabrics_operations import NetworkFabricsOperations -from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations -from ._network_packet_brokers_operations import NetworkPacketBrokersOperations -from ._network_racks_operations import NetworkRacksOperations -from ._network_tap_rules_operations import NetworkTapRulesOperations -from ._network_taps_operations import NetworkTapsOperations -from ._operations import Operations -from ._route_policies_operations import RoutePoliciesOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._access_control_lists_operations import AccessControlListsOperations # type: ignore +from ._internet_gateways_operations import InternetGatewaysOperations # type: ignore +from ._internet_gateway_rules_operations import InternetGatewayRulesOperations # type: ignore +from ._ip_communities_operations import IpCommunitiesOperations # type: ignore +from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations # type: ignore +from ._ip_prefixes_operations import IpPrefixesOperations # type: ignore +from ._l2_isolation_domains_operations import L2IsolationDomainsOperations # type: ignore +from ._l3_isolation_domains_operations import L3IsolationDomainsOperations # type: ignore +from ._internal_networks_operations import InternalNetworksOperations # type: ignore +from ._external_networks_operations import ExternalNetworksOperations # type: ignore +from ._neighbor_groups_operations import NeighborGroupsOperations # type: ignore +from ._network_device_skus_operations import NetworkDeviceSkusOperations # type: ignore +from ._network_devices_operations import NetworkDevicesOperations # type: ignore +from ._network_interfaces_operations import NetworkInterfacesOperations # type: ignore +from ._network_fabric_controllers_operations import NetworkFabricControllersOperations # type: ignore +from ._network_fabric_skus_operations import NetworkFabricSkusOperations # type: ignore +from ._network_fabrics_operations import NetworkFabricsOperations # type: ignore +from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations # type: ignore +from ._network_packet_brokers_operations import NetworkPacketBrokersOperations # type: ignore +from ._network_racks_operations import NetworkRacksOperations # type: ignore +from ._network_tap_rules_operations import NetworkTapRulesOperations # type: ignore +from ._network_taps_operations import NetworkTapsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._route_policies_operations import RoutePoliciesOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -61,5 +67,5 @@ "Operations", "RoutePoliciesOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py index 484a1c843ed5..51f481c1d495 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -233,7 +237,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -247,7 +251,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_update_administrative_state_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_resync_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_resync_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -315,7 +319,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -324,7 +328,7 @@ def build_validate_configuration_request( "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -347,21 +351,23 @@ class AccessControlListsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlList, IO], + body: Union[_models.AccessControlList, IO[bytes]], **kwargs: Any - ) -> _models.AccessControlList: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -374,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -384,7 +390,7 @@ def _create_initial( else: _json = self._serialize.body(body, "AccessControlList") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -392,45 +398,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AccessControlList", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } - @overload def begin_create( self, @@ -455,14 +460,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -475,7 +472,7 @@ def begin_create( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -490,18 +487,10 @@ def begin_create( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -514,7 +503,7 @@ def begin_create( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlList, IO], + body: Union[_models.AccessControlList, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.AccessControlList]: """Creates Access Control List. @@ -526,19 +515,8 @@ def begin_create( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :param body: Request payload. Is either a AccessControlList type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a AccessControlList type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO[bytes] :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -566,12 +544,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -583,17 +562,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.AccessControlList].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return LROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> _models.AccessControlList: @@ -606,12 +583,11 @@ def get(self, resource_group_name: str, access_control_list_name: str, **kwargs: :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: AccessControlList or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -625,49 +601,46 @@ def get(self, resource_group_name: str, access_control_list_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO], + body: Union[_models.AccessControlListPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.AccessControlList]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -680,7 +653,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.AccessControlList]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -690,7 +663,7 @@ def _update_initial( else: _json = self._serialize.body(body, "AccessControlListPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -698,41 +671,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("AccessControlList", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -758,14 +731,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -778,7 +743,7 @@ def begin_update( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -793,18 +758,10 @@ def begin_update( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Access Control List properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -817,7 +774,7 @@ def begin_update( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO], + body: Union[_models.AccessControlListPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.AccessControlList]: """Updates the Access Control List. @@ -830,19 +787,8 @@ def begin_update( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Access Control List properties to update. Is either a AccessControlListPatch type - or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO[bytes] :return: An instance of LROPoller that returns either AccessControlList or the result of cls(response) :rtype: @@ -870,12 +816,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response) + deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -887,22 +834,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.AccessControlList].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return LROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -914,42 +859,48 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> LROPoller[None]: @@ -962,14 +913,6 @@ def begin_delete(self, resource_group_name: str, access_control_list_name: str, :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -983,7 +926,7 @@ def begin_delete(self, resource_group_name: str, access_control_list_name: str, lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, api_version=api_version, @@ -992,11 +935,12 @@ def begin_delete(self, resource_group_name: str, access_control_list_name: str, params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1007,20 +951,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.AccessControlList"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: """List AccessControlLists by resource group. Implements AccessControlLists list by resource group GET method. @@ -1028,7 +968,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AccessControlList or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] :raises ~azure.core.exceptions.HttpResponseError: @@ -1039,7 +978,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1050,16 +989,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1071,13 +1008,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) @@ -1087,34 +1023,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AccessControlList"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: """List AccessControlLists by subscription. Implements AccessControlLists list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AccessControlList or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] :raises ~azure.core.exceptions.HttpResponseError: @@ -1125,7 +1059,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AccessControl api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1136,15 +1070,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AccessControl def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1156,13 +1088,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) @@ -1172,35 +1103,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - } - def _update_administrative_state_initial( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1213,7 +1143,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1223,7 +1153,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, @@ -1231,43 +1161,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1292,14 +1221,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1312,7 +1233,7 @@ def begin_update_administrative_state( self, resource_group_name: str, access_control_list_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1327,18 +1248,10 @@ def begin_update_administrative_state( :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1351,7 +1264,7 @@ def begin_update_administrative_state( self, resource_group_name: str, access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates administrative state of Access Control Lists. @@ -1363,20 +1276,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1404,12 +1306,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1421,22 +1324,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _resync_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1448,50 +1349,49 @@ def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync" - } - @distributed_trace def begin_resync( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any @@ -1505,14 +1405,6 @@ def begin_resync( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1537,12 +1429,13 @@ def begin_resync( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1554,22 +1447,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1581,50 +1472,49 @@ def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, access_control_list_name=access_control_list_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration" - } - @distributed_trace def begin_validate_configuration( self, resource_group_name: str, access_control_list_name: str, **kwargs: Any @@ -1638,14 +1528,6 @@ def begin_validate_configuration( :type resource_group_name: str :param access_control_list_name: Name of the Access Control List. Required. :type access_control_list_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1670,12 +1552,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1687,14 +1570,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py index 1a9c527b18aa..b347baf81231 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,7 +61,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -67,7 +71,7 @@ def build_create_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -97,7 +101,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -107,7 +111,7 @@ def build_get_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -136,7 +140,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -146,7 +150,7 @@ def build_update_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -176,7 +180,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -186,7 +190,7 @@ def build_delete_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -197,7 +201,7 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_l3_isolation_domain_request( +def build_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -210,7 +214,7 @@ def build_list_by_l3_isolation_domain_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -219,7 +223,7 @@ def build_list_by_l3_isolation_domain_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -230,7 +234,7 @@ def build_list_by_l3_isolation_domain_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, @@ -248,7 +252,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -258,7 +262,7 @@ def build_update_administrative_state_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -271,7 +275,7 @@ def build_update_administrative_state_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_static_route_bfd_administrative_state_request( +def build_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, @@ -289,7 +293,7 @@ def build_update_static_route_bfd_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -299,7 +303,7 @@ def build_update_static_route_bfd_administrative_state_request( "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -324,22 +328,24 @@ class ExternalNetworksOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetwork, IO], + body: Union[_models.ExternalNetwork, IO[bytes]], **kwargs: Any - ) -> _models.ExternalNetwork: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +358,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -362,7 +368,7 @@ def _create_initial( else: _json = self._serialize.body(body, "ExternalNetwork") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -371,40 +377,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } - @overload def begin_create( self, @@ -433,14 +437,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -453,7 +449,7 @@ def begin_create( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -471,18 +467,10 @@ def begin_create( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -495,7 +483,7 @@ def begin_create( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetwork, IO], + body: Union[_models.ExternalNetwork, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ExternalNetwork]: """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external @@ -510,19 +498,8 @@ def begin_create( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a ExternalNetwork type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a ExternalNetwork type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO[bytes] :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -550,12 +527,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -567,17 +545,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ExternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return LROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -594,12 +570,11 @@ def get( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: ExternalNetwork or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -613,51 +588,48 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO], + body: Union[_models.ExternalNetworkPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.ExternalNetwork]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -670,7 +642,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.ExternalNetwork]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -680,7 +652,7 @@ def _update_initial( else: _json = self._serialize.body(body, "ExternalNetworkPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -689,41 +661,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ExternalNetwork", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -752,14 +724,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -772,7 +736,7 @@ def begin_update( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -789,18 +753,10 @@ def begin_update( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -813,7 +769,7 @@ def begin_update( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO], + body: Union[_models.ExternalNetworkPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ExternalNetwork]: """Updates a External Networks. @@ -828,19 +784,8 @@ def begin_update( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: ExternalNetwork properties to update. Only annotations are supported. Is either a - ExternalNetworkPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + ExternalNetworkPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO[bytes] :return: An instance of LROPoller that returns either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] @@ -868,12 +813,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response) + deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -885,22 +831,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ExternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return LROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -912,39 +856,45 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -961,14 +911,6 @@ def begin_delete( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -982,7 +924,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -992,11 +934,12 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1007,22 +950,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_l3_isolation_domain( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> Iterable["_models.ExternalNetwork"]: + ) -> ItemPaged["_models.ExternalNetwork"]: """Executes list operation to display External Networks within an isolation domain. Implements External Networks list by resource group GET method. @@ -1032,7 +971,6 @@ def list_by_l3_isolation_domain( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExternalNetwork or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] :raises ~azure.core.exceptions.HttpResponseError: @@ -1043,7 +981,7 @@ def list_by_l3_isolation_domain( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ExternalNetworksList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1054,17 +992,15 @@ def list_by_l3_isolation_domain( def prepare_request(next_link=None): if not next_link: - request = build_list_by_l3_isolation_domain_request( + _request = build_list_by_l3_isolation_domain_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_l3_isolation_domain.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1076,13 +1012,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("ExternalNetworksList", pipeline_response) @@ -1092,36 +1027,35 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_l3_isolation_domain.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks" - } - def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1134,7 +1068,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1144,7 +1078,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -1153,43 +1087,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1217,14 +1150,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1238,7 +1163,7 @@ def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1255,18 +1180,10 @@ def begin_update_administrative_state( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1280,7 +1197,7 @@ def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1294,20 +1211,9 @@ def begin_update_administrative_state( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1336,12 +1242,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1353,27 +1260,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _update_static_route_bfd_administrative_state_initial( + def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1386,7 +1291,7 @@ def _update_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1396,7 +1301,7 @@ def _update_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_static_route_bfd_administrative_state_request( + _request = build_update_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, external_network_name=external_network_name, @@ -1405,45 +1310,44 @@ def _update_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState" - } - @overload - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, @@ -1469,14 +1373,6 @@ def begin_update_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1485,12 +1381,12 @@ def begin_update_static_route_bfd_administrative_state( """ @overload - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1507,18 +1403,10 @@ def begin_update_static_route_bfd_administrative_state( :param external_network_name: Name of the External Network. Required. :type external_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1527,12 +1415,12 @@ def begin_update_static_route_bfd_administrative_state( """ @distributed_trace - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes Static Route BFD state update operation to the underlying resources. @@ -1546,20 +1434,9 @@ def begin_update_static_route_bfd_administrative_state( :type l3_isolation_domain_name: str :param external_network_name: Name of the External Network. Required. :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1588,12 +1465,13 @@ def begin_update_static_route_bfd_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1605,14 +1483,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py index 43541bac41e9..aa5bb61b1530 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,7 +61,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -67,7 +71,7 @@ def build_create_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -97,7 +101,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -107,7 +111,7 @@ def build_get_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -136,7 +140,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -146,7 +150,7 @@ def build_update_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -176,7 +180,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -186,7 +190,7 @@ def build_delete_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -197,7 +201,7 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_l3_isolation_domain_request( +def build_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -210,7 +214,7 @@ def build_list_by_l3_isolation_domain_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -219,7 +223,7 @@ def build_list_by_l3_isolation_domain_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -230,7 +234,7 @@ def build_list_by_l3_isolation_domain_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, @@ -248,7 +252,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -258,7 +262,7 @@ def build_update_administrative_state_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -271,7 +275,7 @@ def build_update_administrative_state_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_bgp_administrative_state_request( +def build_update_bgp_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, @@ -289,7 +293,7 @@ def build_update_bgp_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -299,7 +303,7 @@ def build_update_bgp_administrative_state_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -312,7 +316,7 @@ def build_update_bgp_administrative_state_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_static_route_bfd_administrative_state_request( +def build_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, @@ -330,7 +334,7 @@ def build_update_static_route_bfd_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -340,7 +344,7 @@ def build_update_static_route_bfd_administrative_state_request( "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -365,22 +369,24 @@ class InternalNetworksOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetwork, IO], + body: Union[_models.InternalNetwork, IO[bytes]], **kwargs: Any - ) -> _models.InternalNetwork: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -393,7 +399,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -403,7 +409,7 @@ def _create_initial( else: _json = self._serialize.body(body, "InternalNetwork") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -412,40 +418,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("InternalNetwork", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } - @overload def begin_create( self, @@ -474,14 +478,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -494,7 +490,7 @@ def begin_create( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -512,18 +508,10 @@ def begin_create( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -536,7 +524,7 @@ def begin_create( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetwork, IO], + body: Union[_models.InternalNetwork, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternalNetwork]: """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and @@ -551,19 +539,8 @@ def begin_create( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a InternalNetwork type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternalNetwork type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO[bytes] :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -591,12 +568,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -608,17 +586,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return LROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -635,12 +611,11 @@ def get( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternalNetwork or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -654,51 +629,48 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO], + body: Union[_models.InternalNetworkPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternalNetwork]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -711,7 +683,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternalNetwork]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -721,7 +693,7 @@ def _update_initial( else: _json = self._serialize.body(body, "InternalNetworkPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -730,41 +702,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternalNetwork", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -793,14 +765,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -813,7 +777,7 @@ def begin_update( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -830,18 +794,10 @@ def begin_update( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -854,7 +810,7 @@ def begin_update( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO], + body: Union[_models.InternalNetworkPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternalNetwork]: """API to update certain properties of the InternalNetworks resources. @@ -869,19 +825,8 @@ def begin_update( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: InternalNetwork properties to update. Only annotations are supported. Is either a - InternalNetworkPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + InternalNetworkPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO[bytes] :return: An instance of LROPoller that returns either InternalNetwork or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] @@ -909,12 +854,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response) + deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -926,22 +872,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternalNetwork].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return LROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -953,39 +897,45 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -1002,14 +952,6 @@ def begin_delete( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -1023,7 +965,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1033,11 +975,12 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1048,22 +991,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_l3_isolation_domain( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> Iterable["_models.InternalNetwork"]: + ) -> ItemPaged["_models.InternalNetwork"]: """Executes list operation to display list of all internal networks. Displays InternalNetworks list by resource group GET method. @@ -1073,7 +1012,6 @@ def list_by_l3_isolation_domain( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternalNetwork or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] :raises ~azure.core.exceptions.HttpResponseError: @@ -1084,7 +1022,7 @@ def list_by_l3_isolation_domain( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternalNetworksList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1095,17 +1033,15 @@ def list_by_l3_isolation_domain( def prepare_request(next_link=None): if not next_link: - request = build_list_by_l3_isolation_domain_request( + _request = build_list_by_l3_isolation_domain_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_l3_isolation_domain.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1117,13 +1053,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("InternalNetworksList", pipeline_response) @@ -1133,36 +1068,35 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_l3_isolation_domain.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks" - } - def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1175,7 +1109,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1185,7 +1119,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1194,43 +1128,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1258,14 +1191,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1279,7 +1204,7 @@ def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1296,18 +1221,10 @@ def begin_update_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1321,7 +1238,7 @@ def begin_update_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes the operation to the underlying resources. @@ -1335,20 +1252,9 @@ def begin_update_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1377,12 +1283,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1394,27 +1301,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _update_bgp_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1427,7 +1332,7 @@ def _update_bgp_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1437,7 +1342,7 @@ def _update_bgp_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_bgp_administrative_state_request( + _request = build_update_bgp_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1446,43 +1351,42 @@ def _update_bgp_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_bgp_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_bgp_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState" - } - @overload def begin_update_bgp_administrative_state( self, @@ -1510,14 +1414,6 @@ def begin_update_bgp_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1531,7 +1427,7 @@ def begin_update_bgp_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1548,18 +1444,10 @@ def begin_update_bgp_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1573,7 +1461,7 @@ def begin_update_bgp_administrative_state( resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -1587,20 +1475,9 @@ def begin_update_bgp_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1629,12 +1506,13 @@ def begin_update_bgp_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1646,27 +1524,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_bgp_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _update_static_route_bfd_administrative_state_initial( + def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1679,7 +1555,7 @@ def _update_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1689,7 +1565,7 @@ def _update_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_static_route_bfd_administrative_state_request( + _request = build_update_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, internal_network_name=internal_network_name, @@ -1698,45 +1574,44 @@ def _update_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState" - } - @overload - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, @@ -1762,14 +1637,6 @@ def begin_update_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1778,12 +1645,12 @@ def begin_update_static_route_bfd_administrative_state( """ @overload - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1800,18 +1667,10 @@ def begin_update_static_route_bfd_administrative_state( :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1820,12 +1679,12 @@ def begin_update_static_route_bfd_administrative_state( """ @distributed_trace - def begin_update_static_route_bfd_administrative_state( + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1839,20 +1698,9 @@ def begin_update_static_route_bfd_administrative_state( :type l3_isolation_domain_name: str :param internal_network_name: Name of the Internal Network. Required. :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1881,12 +1729,13 @@ def begin_update_static_route_bfd_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1898,14 +1747,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py index ccb544cbc307..807321274f7d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,21 +249,23 @@ class InternetGatewayRulesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO], + body: Union[_models.InternetGatewayRule, IO[bytes]], **kwargs: Any - ) -> _models.InternetGatewayRule: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -282,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "InternetGatewayRule") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, @@ -290,45 +296,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } - @overload def begin_create( self, @@ -353,14 +358,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -373,7 +370,7 @@ def begin_create( self, resource_group_name: str, internet_gateway_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -388,18 +385,10 @@ def begin_create( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -412,7 +401,7 @@ def begin_create( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO], + body: Union[_models.InternetGatewayRule, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternetGatewayRule]: """Creates an Internet Gateway rule. @@ -424,19 +413,9 @@ def begin_create( :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :param body: Request payload. Is either a InternetGatewayRule type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternetGatewayRule type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO[bytes] :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -464,12 +443,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -481,17 +461,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternetGatewayRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return LROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -506,12 +484,11 @@ def get( :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternetGatewayRule or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,49 +502,46 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO], + body: Union[_models.InternetGatewayRulePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternetGatewayRule]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +554,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -590,7 +564,7 @@ def _update_initial( else: _json = self._serialize.body(body, "InternetGatewayRulePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, @@ -598,41 +572,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -658,14 +632,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -678,7 +644,7 @@ def begin_update( self, resource_group_name: str, internet_gateway_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -693,18 +659,10 @@ def begin_update( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Internet Gateway Rule properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -717,7 +675,7 @@ def begin_update( self, resource_group_name: str, internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO], + body: Union[_models.InternetGatewayRulePatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternetGatewayRule]: """Updates an Internet Gateway Rule. @@ -730,19 +688,8 @@ def begin_update( :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str :param body: Internet Gateway Rule properties to update. Is either a InternetGatewayRulePatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO[bytes] :return: An instance of LROPoller that returns either InternetGatewayRule or the result of cls(response) :rtype: @@ -770,12 +717,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response) + deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -787,22 +735,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternetGatewayRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return LROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,30 +760,36 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -846,12 +798,12 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any) -> LROPoller[None]: @@ -864,14 +816,6 @@ def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str :type resource_group_name: str :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. :type internet_gateway_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -885,7 +829,7 @@ def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, internet_gateway_rule_name=internet_gateway_rule_name, api_version=api_version, @@ -894,11 +838,12 @@ def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -909,22 +854,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.InternetGatewayRule"]: + ) -> ItemPaged["_models.InternetGatewayRule"]: """List Internet Gateway Rules by resource group. Implements Internet Gateway Rules list by resource group GET method. @@ -932,7 +873,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] @@ -944,7 +884,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,16 +895,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -976,13 +914,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) @@ -992,34 +929,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGatewayRule"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGatewayRule"]: """List Internet Gateway Rules by subscription. List all Internet Gateway rules in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] @@ -1031,7 +966,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGatew api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,15 +977,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGatew def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1062,13 +995,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) @@ -1078,23 +1010,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py index 634f76770cf5..881b9533ce96 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,21 +249,23 @@ class InternetGatewaysOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGateway, IO], + body: Union[_models.InternetGateway, IO[bytes]], **kwargs: Any - ) -> _models.InternetGateway: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -282,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "InternetGateway") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, @@ -290,45 +296,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGateway", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } - @overload def begin_create( self, @@ -353,14 +358,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -372,7 +369,7 @@ def begin_create( self, resource_group_name: str, internet_gateway_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -387,18 +384,10 @@ def begin_create( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -410,7 +399,7 @@ def begin_create( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGateway, IO], + body: Union[_models.InternetGateway, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternetGateway]: """Create a Network Fabric Service Internet Gateway. @@ -422,19 +411,8 @@ def begin_create( :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :param body: Request payload. Is either a InternetGateway type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a InternetGateway type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO[bytes] :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -461,12 +439,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -478,17 +457,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternetGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return LROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: @@ -501,12 +478,11 @@ def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: An :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: InternetGateway or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,49 +496,46 @@ def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: An api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO], + body: Union[_models.InternetGatewayPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.InternetGateway]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +548,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.InternetGateway]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -585,7 +558,7 @@ def _update_initial( else: _json = self._serialize.body(body, "InternetGatewayPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, @@ -593,41 +566,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("InternetGateway", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -653,14 +626,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -672,7 +637,7 @@ def begin_update( self, resource_group_name: str, internet_gateway_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -687,18 +652,10 @@ def begin_update( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -710,7 +667,7 @@ def begin_update( self, resource_group_name: str, internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO], + body: Union[_models.InternetGatewayPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.InternetGateway]: """Updates a Network Fabric Service Internet Gateway. @@ -723,19 +680,8 @@ def begin_update( :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - InternetGatewayPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + InternetGatewayPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO[bytes] :return: An instance of LROPoller that returns either InternetGateway or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] @@ -762,12 +708,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response) + deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -779,22 +726,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.InternetGateway].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return LROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -806,38 +749,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> LROPoller[None]: @@ -850,14 +799,6 @@ def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **k :type resource_group_name: str :param internet_gateway_name: Name of the Internet Gateway. Required. :type internet_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -871,7 +812,7 @@ def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **k lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, internet_gateway_name=internet_gateway_name, api_version=api_version, @@ -880,11 +821,12 @@ def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **k params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -895,20 +837,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.InternetGateway"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: """List Internet Gateways by resource group. Displays Internet Gateways list by resource group GET method. @@ -916,7 +854,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGateway or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] :raises ~azure.core.exceptions.HttpResponseError: @@ -927,7 +864,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -938,16 +875,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -959,13 +894,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) @@ -975,34 +909,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGateway"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: """List Internet Gateways by subscription. Displays Internet Gateways list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InternetGateway or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] :raises ~azure.core.exceptions.HttpResponseError: @@ -1013,7 +945,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGatew api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1024,15 +956,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.InternetGatew def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1044,13 +974,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) @@ -1060,23 +989,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py index 861d85bba59d..240bf9a371fb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,17 +249,23 @@ class IpCommunitiesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunity, IO], **kwargs: Any - ) -> _models.IpCommunity: - error_map = { + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -278,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "IpCommunity") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, @@ -286,45 +296,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpCommunity", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } - @overload def begin_create( self, @@ -349,14 +358,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -368,7 +369,7 @@ def begin_create( self, resource_group_name: str, ip_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -383,18 +384,10 @@ def begin_create( :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -403,7 +396,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunity, IO], **kwargs: Any + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.IpCommunity]: """Create an IP Community. @@ -414,19 +411,8 @@ def begin_create( :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :param body: Request payload. Is either a IpCommunity type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpCommunity type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO[bytes] :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -453,12 +439,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -470,17 +457,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return LROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: @@ -493,12 +478,11 @@ def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) - :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpCommunity or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -512,45 +496,46 @@ def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore def _update_initial( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunityPatch, IO], **kwargs: Any - ) -> Optional[_models.IpCommunity]: - error_map = { + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -563,7 +548,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpCommunity]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -573,7 +558,7 @@ def _update_initial( else: _json = self._serialize.body(body, "IpCommunityPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, @@ -581,41 +566,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpCommunity", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -641,14 +626,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -660,7 +637,7 @@ def begin_update( self, resource_group_name: str, ip_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -675,18 +652,10 @@ def begin_update( :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str :param body: IP Community properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -695,7 +664,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, ip_community_name: str, body: Union[_models.IpCommunityPatch, IO], **kwargs: Any + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.IpCommunity]: """Updates an IP Community. @@ -706,20 +679,9 @@ def begin_update( :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :param body: IP Community properties to update. Is either a IpCommunityPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: IP Community properties to update. Is either a IpCommunityPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO[bytes] :return: An instance of LROPoller that returns either IpCommunity or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] @@ -746,12 +708,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response) + deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -763,22 +726,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return LROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ip_community_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -790,30 +749,36 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_community_name=ip_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -822,12 +787,12 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> LROPoller[None]: @@ -840,14 +805,6 @@ def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwarg :type resource_group_name: str :param ip_community_name: Name of the IP Community. Required. :type ip_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -861,7 +818,7 @@ def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwarg lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, ip_community_name=ip_community_name, api_version=api_version, @@ -870,11 +827,12 @@ def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwarg params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -885,20 +843,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpCommunity"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: """List IP Communities by resource group. Implements IP Communities list by resource group GET method. @@ -906,7 +860,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpCommunity or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] :raises ~azure.core.exceptions.HttpResponseError: @@ -917,7 +870,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -928,16 +881,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -949,13 +900,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) @@ -965,34 +915,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpCommunity"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: """List IP Communities by subscription. Implements IP Communities list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpCommunity or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] :raises ~azure.core.exceptions.HttpResponseError: @@ -1003,7 +951,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpCommunity"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1014,15 +962,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpCommunity"] def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1034,13 +980,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) @@ -1050,23 +995,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py index 9315e7414a1d..1875a09bd821 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,21 +249,23 @@ class IpExtendedCommunitiesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO], + body: Union[_models.IpExtendedCommunity, IO[bytes]], **kwargs: Any - ) -> _models.IpExtendedCommunity: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -282,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "IpExtendedCommunity") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, @@ -290,45 +296,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } - @overload def begin_create( self, @@ -353,14 +358,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -373,7 +370,7 @@ def begin_create( self, resource_group_name: str, ip_extended_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -388,18 +385,10 @@ def begin_create( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -412,7 +401,7 @@ def begin_create( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO], + body: Union[_models.IpExtendedCommunity, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.IpExtendedCommunity]: """Create an IP Extended Community. @@ -424,19 +413,9 @@ def begin_create( :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :param body: Request payload. Is either a IpExtendedCommunity type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpExtendedCommunity type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO[bytes] :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -464,12 +443,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -481,17 +461,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpExtendedCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return LROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -506,12 +484,11 @@ def get( :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpExtendedCommunity or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -525,49 +502,46 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO], + body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.IpExtendedCommunity]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -580,7 +554,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -590,7 +564,7 @@ def _update_initial( else: _json = self._serialize.body(body, "IpExtendedCommunityPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, @@ -598,41 +572,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -658,14 +632,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -678,7 +644,7 @@ def begin_update( self, resource_group_name: str, ip_extended_community_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -693,18 +659,10 @@ def begin_update( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: IP Extended Community properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -717,7 +675,7 @@ def begin_update( self, resource_group_name: str, ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO], + body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.IpExtendedCommunity]: """Updates the IP Extended Community. @@ -730,19 +688,8 @@ def begin_update( :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str :param body: IP Extended Community properties to update. Is either a IpExtendedCommunityPatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO[bytes] :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of cls(response) :rtype: @@ -770,12 +717,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response) + deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -787,22 +735,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpExtendedCommunity].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return LROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -814,30 +760,36 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -846,12 +798,12 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any) -> LROPoller[None]: @@ -864,14 +816,6 @@ def begin_delete(self, resource_group_name: str, ip_extended_community_name: str :type resource_group_name: str :param ip_extended_community_name: Name of the IP Extended Community. Required. :type ip_extended_community_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -885,7 +829,7 @@ def begin_delete(self, resource_group_name: str, ip_extended_community_name: str lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, ip_extended_community_name=ip_extended_community_name, api_version=api_version, @@ -894,11 +838,12 @@ def begin_delete(self, resource_group_name: str, ip_extended_community_name: str params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -909,22 +854,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.IpExtendedCommunity"]: + ) -> ItemPaged["_models.IpExtendedCommunity"]: """List IpExtendedCommunities by resource group. Implements IpExtendedCommunities list by resource group GET method. @@ -932,7 +873,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] @@ -944,7 +884,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,16 +895,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -976,13 +914,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) @@ -992,34 +929,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpExtendedCommunity"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpExtendedCommunity"]: """List IpExtendedCommunities by subscription. Implements IpExtendedCommunities list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] @@ -1031,7 +966,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpExtendedCom api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1042,15 +977,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpExtendedCom def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1062,13 +995,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) @@ -1078,23 +1010,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py index 86cd6027d893..18e2ecbde087 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -222,7 +226,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,17 +249,19 @@ class IpPrefixesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO], **kwargs: Any - ) -> _models.IpPrefix: - error_map = { + self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +274,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -278,7 +284,7 @@ def _create_initial( else: _json = self._serialize.body(body, "IpPrefix") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, @@ -286,45 +292,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpPrefix", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } - @overload def begin_create( self, @@ -349,14 +354,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -367,7 +364,7 @@ def begin_create( self, resource_group_name: str, ip_prefix_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -382,18 +379,10 @@ def begin_create( :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -401,7 +390,7 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO], **kwargs: Any + self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.IpPrefix]: """Create an IP Prefix. @@ -412,19 +401,8 @@ def begin_create( :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :param body: Request payload. Is either a IpPrefix type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a IpPrefix type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO[bytes] :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -450,12 +428,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -467,17 +446,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpPrefix].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return LROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: @@ -490,12 +467,11 @@ def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _ :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: IpPrefix or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -509,45 +485,46 @@ def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore def _update_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefixPatch, IO], **kwargs: Any - ) -> Optional[_models.IpPrefix]: - error_map = { + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -560,7 +537,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.IpPrefix]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -570,7 +547,7 @@ def _update_initial( else: _json = self._serialize.body(body, "IpPrefixPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, @@ -578,41 +555,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("IpPrefix", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -638,14 +615,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -656,7 +625,7 @@ def begin_update( self, resource_group_name: str, ip_prefix_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -671,18 +640,10 @@ def begin_update( :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str :param body: IP Prefix properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -690,7 +651,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefixPatch, IO], **kwargs: Any + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.IpPrefix]: """Updates the IP Prefix. @@ -701,20 +666,9 @@ def begin_update( :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO[bytes] :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -740,12 +694,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response) + deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -757,22 +712,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.IpPrefix].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return LROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -784,30 +735,36 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -816,12 +773,12 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements "str", response.headers.get("Azure-AsyncOperation") ) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> LROPoller[None]: @@ -834,14 +791,6 @@ def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: :type resource_group_name: str :param ip_prefix_name: Name of the IP Prefix. Required. :type ip_prefix_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -855,7 +804,7 @@ def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, ip_prefix_name=ip_prefix_name, api_version=api_version, @@ -864,11 +813,12 @@ def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -879,20 +829,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.IpPrefix"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: """List IpPrefixes by resource group. Implements IpPrefixes list by resource group GET method. @@ -900,7 +846,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpPrefix or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -911,7 +856,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -922,16 +867,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -943,13 +886,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) @@ -959,34 +901,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpPrefix"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: """List IpPrefixes by subscription. Implements IpPrefixes list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either IpPrefix or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] :raises ~azure.core.exceptions.HttpResponseError: @@ -997,7 +937,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpPrefix"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1008,15 +948,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.IpPrefix"]: def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1028,13 +966,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) @@ -1044,23 +981,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py index d0a8ace42926..481777f2a5bf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -177,7 +181,7 @@ def build_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -191,7 +195,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -200,7 +204,7 @@ def build_update_administrative_state_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -226,7 +230,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -235,7 +239,7 @@ def build_validate_configuration_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -259,7 +263,7 @@ def build_commit_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -268,7 +272,7 @@ def build_commit_configuration_request( "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -290,7 +294,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -298,7 +302,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -319,12 +323,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -347,21 +351,23 @@ class L2IsolationDomainsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO], + body: Union[_models.L2IsolationDomain, IO[bytes]], **kwargs: Any - ) -> _models.L2IsolationDomain: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -374,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -384,7 +390,7 @@ def _create_initial( else: _json = self._serialize.body(body, "L2IsolationDomain") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -392,40 +398,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } - @overload def begin_create( self, @@ -451,14 +455,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -471,7 +467,7 @@ def begin_create( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -487,18 +483,10 @@ def begin_create( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -511,7 +499,7 @@ def begin_create( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO], + body: Union[_models.L2IsolationDomain, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.L2IsolationDomain]: """Create L2 Isolation Domain. @@ -524,19 +512,8 @@ def begin_create( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :param body: Request payload. Is either a L2IsolationDomain type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a L2IsolationDomain type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO[bytes] :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -564,12 +541,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -581,17 +559,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.L2IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return LROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> _models.L2IsolationDomain: @@ -604,12 +580,11 @@ def get(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: L2IsolationDomain or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -623,49 +598,46 @@ def get(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO], + body: Union[_models.L2IsolationDomainPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.L2IsolationDomain]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -678,7 +650,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -688,7 +660,7 @@ def _update_initial( else: _json = self._serialize.body(body, "L2IsolationDomainPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -696,41 +668,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -756,14 +728,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -776,7 +740,7 @@ def begin_update( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -791,18 +755,10 @@ def begin_update( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -815,7 +771,7 @@ def begin_update( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO], + body: Union[_models.L2IsolationDomainPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.L2IsolationDomain]: """Updates the L2 Isolation Domain. @@ -828,19 +784,8 @@ def begin_update( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - L2IsolationDomainPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + L2IsolationDomainPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO[bytes] :return: An instance of LROPoller that returns either L2IsolationDomain or the result of cls(response) :rtype: @@ -868,12 +813,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response) + deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -885,22 +831,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.L2IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return LROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -912,38 +856,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: @@ -956,14 +906,6 @@ def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -977,7 +919,7 @@ def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, api_version=api_version, @@ -986,11 +928,12 @@ def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1001,26 +944,22 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _update_administrative_state_initial( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1033,7 +972,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1043,7 +982,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -1051,43 +990,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1112,14 +1050,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1132,7 +1062,7 @@ def begin_update_administrative_state( self, resource_group_name: str, l2_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1147,18 +1077,10 @@ def begin_update_administrative_state( :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1171,7 +1093,7 @@ def begin_update_administrative_state( self, resource_group_name: str, l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Implements the operation to the underlying resources. @@ -1183,20 +1105,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1224,12 +1135,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1241,22 +1153,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,50 +1178,49 @@ def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration" - } - @distributed_trace def begin_validate_configuration( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any @@ -1323,14 +1232,6 @@ def begin_validate_configuration( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1355,12 +1256,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1372,22 +1274,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _commit_configuration_initial( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1399,50 +1299,49 @@ def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, l2_isolation_domain_name=l2_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration" - } - @distributed_trace def begin_commit_configuration( self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any @@ -1456,14 +1355,6 @@ def begin_commit_configuration( :type resource_group_name: str :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. :type l2_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1488,12 +1379,13 @@ def begin_commit_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1505,20 +1397,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.L2IsolationDomain"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: """List L2IsolationDomains by resource group. Displays L2IsolationDomains list by resource group GET method. @@ -1526,7 +1416,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] :raises ~azure.core.exceptions.HttpResponseError: @@ -1537,7 +1426,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1548,16 +1437,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1569,13 +1456,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) @@ -1585,34 +1471,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L2IsolationDomain"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: """List L2IsolationDomains by subscription. Displays L2IsolationDomains list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] :raises ~azure.core.exceptions.HttpResponseError: @@ -1623,7 +1507,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L2IsolationDo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1634,15 +1518,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L2IsolationDo def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1654,13 +1536,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) @@ -1670,23 +1551,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py index e4f0871b7a9c..d218e86fa92a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -233,7 +237,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -247,7 +251,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_update_administrative_state_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_validate_configuration_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -315,7 +319,7 @@ def build_commit_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -324,7 +328,7 @@ def build_commit_configuration_request( "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -347,21 +351,23 @@ class L3IsolationDomainsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO], + body: Union[_models.L3IsolationDomain, IO[bytes]], **kwargs: Any - ) -> _models.L3IsolationDomain: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -374,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -384,7 +390,7 @@ def _create_initial( else: _json = self._serialize.body(body, "L3IsolationDomain") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -392,40 +398,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } - @overload def begin_create( self, @@ -452,14 +456,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -472,7 +468,7 @@ def begin_create( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -489,18 +485,10 @@ def begin_create( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -513,7 +501,7 @@ def begin_create( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO], + body: Union[_models.L3IsolationDomain, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.L3IsolationDomain]: """Create L3 Isolation Domain. @@ -527,19 +515,8 @@ def begin_create( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :param body: Request payload. Is either a L3IsolationDomain type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a L3IsolationDomain type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO[bytes] :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -567,12 +544,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -584,17 +562,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.L3IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return LROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> _models.L3IsolationDomain: @@ -607,12 +583,11 @@ def get(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: L3IsolationDomain or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,49 +601,46 @@ def get(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO], + body: Union[_models.L3IsolationDomainPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.L3IsolationDomain]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -681,7 +653,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -691,7 +663,7 @@ def _update_initial( else: _json = self._serialize.body(body, "L3IsolationDomainPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -699,41 +671,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -759,14 +731,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -779,7 +743,7 @@ def begin_update( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -794,18 +758,10 @@ def begin_update( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -818,7 +774,7 @@ def begin_update( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO], + body: Union[_models.L3IsolationDomainPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.L3IsolationDomain]: """Updates a L3 Isolation Domain. @@ -831,19 +787,8 @@ def begin_update( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: API to update certain properties of the L3 Isolation Domain resource. Is either a - L3IsolationDomainPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + L3IsolationDomainPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO[bytes] :return: An instance of LROPoller that returns either L3IsolationDomain or the result of cls(response) :rtype: @@ -871,12 +816,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response) + deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -888,22 +834,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.L3IsolationDomain].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return LROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,38 +859,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: @@ -959,14 +909,6 @@ def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -980,7 +922,7 @@ def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, api_version=api_version, @@ -989,11 +931,12 @@ def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1004,20 +947,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.L3IsolationDomain"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: """List L3IsolationDomains by resource group. Displays L3IsolationDomains list by resource group GET method. @@ -1025,7 +964,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] :raises ~azure.core.exceptions.HttpResponseError: @@ -1036,7 +974,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1047,16 +985,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1068,13 +1004,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) @@ -1084,34 +1019,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L3IsolationDomain"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: """List L3IsolationDomains by subscription. Displays L3IsolationDomains list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] :raises ~azure.core.exceptions.HttpResponseError: @@ -1122,7 +1055,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L3IsolationDo api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1133,15 +1066,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.L3IsolationDo def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1153,13 +1084,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) @@ -1169,35 +1099,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - } - def _update_administrative_state_initial( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1210,7 +1139,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1220,7 +1149,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, @@ -1228,43 +1157,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1289,14 +1217,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1309,7 +1229,7 @@ def begin_update_administrative_state( self, resource_group_name: str, l3_isolation_domain_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1324,18 +1244,10 @@ def begin_update_administrative_state( :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1348,7 +1260,7 @@ def begin_update_administrative_state( self, resource_group_name: str, l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """executes enable operation to the underlying resources. @@ -1360,20 +1272,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1401,12 +1302,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1418,22 +1320,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1445,50 +1345,49 @@ def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration" - } - @distributed_trace def begin_validate_configuration( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any @@ -1500,14 +1399,6 @@ def begin_validate_configuration( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1532,12 +1423,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1549,22 +1441,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _commit_configuration_initial( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1576,50 +1466,49 @@ def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, l3_isolation_domain_name=l3_isolation_domain_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration" - } - @distributed_trace def begin_commit_configuration( self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any @@ -1633,14 +1522,6 @@ def begin_commit_configuration( :type resource_group_name: str :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. :type l3_isolation_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1665,12 +1546,13 @@ def begin_commit_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1682,14 +1564,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py index cf0d66ab43d0..4d57a6239d7f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,17 +249,23 @@ class NeighborGroupsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, neighbor_group_name: str, body: Union[_models.NeighborGroup, IO], **kwargs: Any - ) -> _models.NeighborGroup: - error_map = { + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -278,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NeighborGroup") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, @@ -286,40 +296,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NeighborGroup", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } - @overload def begin_create( self, @@ -344,14 +352,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -363,7 +363,7 @@ def begin_create( self, resource_group_name: str, neighbor_group_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -378,18 +378,10 @@ def begin_create( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -398,7 +390,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, neighbor_group_name: str, body: Union[_models.NeighborGroup, IO], **kwargs: Any + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NeighborGroup]: """Creates the Neighbor Group. @@ -409,19 +405,8 @@ def begin_create( :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :param body: Request payload. Is either a NeighborGroup type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NeighborGroup type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO[bytes] :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -448,12 +433,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -465,17 +451,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NeighborGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return LROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: @@ -488,12 +472,11 @@ def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NeighborGroup or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,49 +490,46 @@ def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO], + body: Union[_models.NeighborGroupPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NeighborGroup]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -562,7 +542,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NeighborGroup]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -572,7 +552,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NeighborGroupPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, @@ -580,41 +560,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NeighborGroup", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -640,14 +620,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -659,7 +631,7 @@ def begin_update( self, resource_group_name: str, neighbor_group_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -674,18 +646,10 @@ def begin_update( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -697,7 +661,7 @@ def begin_update( self, resource_group_name: str, neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO], + body: Union[_models.NeighborGroupPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NeighborGroup]: """API to update certain properties of the Neighbor Group Resources. @@ -710,19 +674,8 @@ def begin_update( :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str :param body: Neighbor Group properties to update. Only annotations are supported. Is either a - NeighborGroupPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NeighborGroupPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO[bytes] :return: An instance of LROPoller that returns either NeighborGroup or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] @@ -749,12 +702,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response) + deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -766,22 +720,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NeighborGroup].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return LROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,38 +743,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> LROPoller[None]: @@ -837,14 +793,6 @@ def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwa :type resource_group_name: str :param neighbor_group_name: Name of the Neighbor Group. Required. :type neighbor_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -858,7 +806,7 @@ def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwa lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, neighbor_group_name=neighbor_group_name, api_version=api_version, @@ -867,11 +815,12 @@ def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwa params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -882,20 +831,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NeighborGroup"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: """List Neighbor Groups by resource group. Displays NeighborGroups list by resource group GET method. @@ -903,7 +848,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NeighborGroup or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] :raises ~azure.core.exceptions.HttpResponseError: @@ -914,7 +858,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -925,16 +869,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -946,13 +888,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) @@ -962,34 +903,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NeighborGroup"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: """List Neighbor Groups by subscription. Displays NeighborGroups list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NeighborGroup or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] :raises ~azure.core.exceptions.HttpResponseError: @@ -1000,7 +939,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NeighborGroup api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,15 +950,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NeighborGroup def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1031,13 +968,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) @@ -1047,23 +983,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py index 9d35c32dab2b..f758036ad735 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +21,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,13 +49,13 @@ def build_get_request(network_device_sku_name: str, subscription_id: str, **kwar _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "networkDeviceSkuName": _SERIALIZER.url("network_device_sku_name", network_device_sku_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -74,12 +76,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -102,12 +104,14 @@ class NetworkDeviceSkusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: @@ -117,12 +121,11 @@ def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDev :param network_device_sku_name: Name of the Network Device SKU. Required. :type network_device_sku_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkDeviceSku or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -136,47 +139,43 @@ def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDev api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( network_device_sku_name=network_device_sku_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkDeviceSku", pipeline_response) + deserialized = self._deserialize("NetworkDeviceSku", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}" - } + return deserialized # type: ignore @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDeviceSku"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDeviceSku"]: """List Network Device SKUs by subscription. List Network Device SKUs for the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDeviceSku or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] :raises ~azure.core.exceptions.HttpResponseError: @@ -187,7 +186,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDevice api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDeviceSkusListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,15 +197,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDevice def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -218,13 +215,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDeviceSkusListResult", pipeline_response) @@ -234,23 +230,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py index 3b02b693a5aa..84902de2bb51 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -247,7 +251,7 @@ def build_reboot_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_reboot_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_refresh_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_refresh_configuration_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -302,7 +306,7 @@ def build_refresh_configuration_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -316,7 +320,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -325,7 +329,7 @@ def build_update_administrative_state_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -352,7 +356,7 @@ def build_upgrade_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -361,7 +365,7 @@ def build_upgrade_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -386,17 +390,23 @@ class NetworkDevicesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, network_device_name: str, body: Union[_models.NetworkDevice, IO], **kwargs: Any - ) -> _models.NetworkDevice: - error_map = { + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -409,7 +419,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -419,7 +429,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkDevice") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -427,40 +437,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkDevice", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } - @overload def begin_create( self, @@ -485,14 +493,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -504,7 +504,7 @@ def begin_create( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -519,18 +519,10 @@ def begin_create( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -539,7 +531,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, network_device_name: str, body: Union[_models.NetworkDevice, IO], **kwargs: Any + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkDevice]: """Create Network Device. @@ -550,19 +546,8 @@ def begin_create( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a NetworkDevice type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkDevice type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO[bytes] :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -589,12 +574,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -606,17 +592,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkDevice].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return LROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: @@ -629,12 +613,11 @@ def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkDevice or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -648,49 +631,46 @@ def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO], + body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkDevice]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +683,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkDevice]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -713,7 +693,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkDevicePatchParameters") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -721,41 +701,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkDevice", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -781,14 +761,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -800,7 +772,7 @@ def begin_update( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -815,18 +787,10 @@ def begin_update( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Network Device properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -838,7 +802,7 @@ def begin_update( self, resource_group_name: str, network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO], + body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkDevice]: """Updates a Network Device. @@ -851,19 +815,8 @@ def begin_update( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Network Device properties to update. Is either a NetworkDevicePatchParameters type - or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO[bytes] :return: An instance of LROPoller that returns either NetworkDevice or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] @@ -890,12 +843,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response) + deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -907,22 +861,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkDevice].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return LROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -934,38 +884,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> LROPoller[None]: @@ -978,14 +934,6 @@ def begin_delete(self, resource_group_name: str, network_device_name: str, **kwa :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -999,7 +947,7 @@ def begin_delete(self, resource_group_name: str, network_device_name: str, **kwa lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_device_name=network_device_name, api_version=api_version, @@ -1008,11 +956,12 @@ def begin_delete(self, resource_group_name: str, network_device_name: str, **kwa params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1023,20 +972,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkDevice"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: """List NetworkDevices by resource group. List all the Network Device resources in a given resource group. @@ -1044,7 +989,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDevice or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] :raises ~azure.core.exceptions.HttpResponseError: @@ -1055,7 +999,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,16 +1010,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1087,13 +1029,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) @@ -1103,34 +1044,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDevice"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: """List NetworkDevices by subscription. List all the Network Device resources in a given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkDevice or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] :raises ~azure.core.exceptions.HttpResponseError: @@ -1141,7 +1080,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDevice api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1152,15 +1091,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkDevice def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1172,13 +1109,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) @@ -1188,35 +1124,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - } - def _reboot_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.RebootProperties, IO], + body: Union[_models.RebootProperties, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1229,7 +1164,7 @@ def _reboot_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1239,7 +1174,7 @@ def _reboot_initial( else: _json = self._serialize.body(body, "RebootProperties") - request = build_reboot_request( + _request = build_reboot_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -1247,43 +1182,42 @@ def _reboot_initial( content_type=content_type, json=_json, content=_content, - template_url=self._reboot_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _reboot_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot" - } - @overload def begin_reboot( self, @@ -1308,14 +1242,6 @@ def begin_reboot( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1328,7 +1254,7 @@ def begin_reboot( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1343,18 +1269,10 @@ def begin_reboot( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1367,7 +1285,7 @@ def begin_reboot( self, resource_group_name: str, network_device_name: str, - body: Union[_models.RebootProperties, IO], + body: Union[_models.RebootProperties, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1379,19 +1297,8 @@ def begin_reboot( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a RebootProperties type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a RebootProperties type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1419,12 +1326,13 @@ def begin_reboot( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1436,22 +1344,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_reboot.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _refresh_configuration_initial( self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1463,50 +1369,49 @@ def _refresh_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_refresh_configuration_request( + _request = build_refresh_configuration_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._refresh_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _refresh_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration" - } - @distributed_trace def begin_refresh_configuration( self, resource_group_name: str, network_device_name: str, **kwargs: Any @@ -1520,14 +1425,6 @@ def begin_refresh_configuration( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1552,12 +1449,13 @@ def begin_refresh_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1569,26 +1467,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_refresh_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _update_administrative_state_initial( self, resource_group_name: str, network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO], + body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1601,7 +1497,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1611,7 +1507,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateDeviceAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -1619,43 +1515,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1680,14 +1575,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1700,7 +1587,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1715,18 +1602,10 @@ def begin_update_administrative_state( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1739,7 +1618,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO], + body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1751,20 +1630,10 @@ def begin_update_administrative_state( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or + IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1792,12 +1661,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1809,22 +1679,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _upgrade_initial( - self, resource_group_name: str, network_device_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateVersion, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1837,7 +1709,7 @@ def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1847,7 +1719,7 @@ def _upgrade_initial( else: _json = self._serialize.body(body, "UpdateVersion") - request = build_upgrade_request( + _request = build_upgrade_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, @@ -1855,43 +1727,42 @@ def _upgrade_initial( content_type=content_type, json=_json, content=_content, - template_url=self._upgrade_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _upgrade_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade" - } - @overload def begin_upgrade( self, @@ -1916,14 +1787,6 @@ def begin_upgrade( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1936,7 +1799,7 @@ def begin_upgrade( self, resource_group_name: str, network_device_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1951,18 +1814,10 @@ def begin_upgrade( :param network_device_name: Name of the Network Device. Required. :type network_device_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1972,7 +1827,11 @@ def begin_upgrade( @distributed_trace def begin_upgrade( - self, resource_group_name: str, network_device_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateVersion, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1983,19 +1842,8 @@ def begin_upgrade( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :param body: Request payload. Is either a UpdateVersion type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a UpdateVersion type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2023,12 +1871,13 @@ def begin_upgrade( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2040,14 +1889,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_upgrade.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py index 9dc83e2ddb5c..7fe77d4d3012 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -64,7 +68,7 @@ def build_create_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -90,7 +94,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -101,7 +105,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -126,7 +130,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -137,7 +141,7 @@ def build_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -163,7 +167,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -174,7 +178,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -204,7 +208,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -226,12 +230,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -254,21 +258,23 @@ class NetworkFabricControllersOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO], + body: Union[_models.NetworkFabricController, IO[bytes]], **kwargs: Any - ) -> _models.NetworkFabricController: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,7 +287,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -291,7 +297,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkFabricController") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, @@ -299,40 +305,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } - @overload def begin_create( self, @@ -357,14 +361,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -377,7 +373,7 @@ def begin_create( self, resource_group_name: str, network_fabric_controller_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -392,18 +388,10 @@ def begin_create( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -416,7 +404,7 @@ def begin_create( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO], + body: Union[_models.NetworkFabricController, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkFabricController]: """Create Network fabric controller. @@ -428,19 +416,9 @@ def begin_create( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :param body: Request payload. Is either a NetworkFabricController type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkFabricController type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO[bytes] :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -468,12 +446,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -485,17 +464,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkFabricController].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return LROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -510,12 +487,11 @@ def get( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabricController or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -529,49 +505,46 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO], + body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkFabricController]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -584,7 +557,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkFabricController]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -594,7 +567,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkFabricControllerPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, @@ -602,41 +575,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabricController", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -662,14 +635,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -682,7 +647,7 @@ def begin_update( self, resource_group_name: str, network_fabric_controller_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -697,18 +662,10 @@ def begin_update( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Network Fabric Controller properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -721,7 +678,7 @@ def begin_update( self, resource_group_name: str, network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO], + body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkFabricController]: """Updates a Network Fabric Controller. @@ -734,19 +691,8 @@ def begin_update( :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str :param body: Network Fabric Controller properties to update. Is either a - NetworkFabricControllerPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkFabricControllerPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkFabricController or the result of cls(response) :rtype: @@ -774,12 +720,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response) + deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -791,22 +738,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkFabricController].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return LROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -818,42 +763,48 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -868,14 +819,6 @@ def begin_delete( :type resource_group_name: str :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. :type network_fabric_controller_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -889,7 +832,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_fabric_controller_name=network_fabric_controller_name, api_version=api_version, @@ -898,11 +841,12 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -913,22 +857,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkFabricController"]: + ) -> ItemPaged["_models.NetworkFabricController"]: """List NetworkFabricControllers by resource group. Lists all the NetworkFabricControllers thats available in the resource group. @@ -936,7 +876,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricController or the result of cls(response) :rtype: @@ -949,7 +888,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -960,16 +899,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -981,13 +918,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) @@ -997,34 +933,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabricController"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricController"]: """List NetworkFabricControllers by subscription. Lists all the NetworkFabricControllers by subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricController or the result of cls(response) :rtype: @@ -1037,7 +971,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1048,15 +982,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1068,13 +1000,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) @@ -1084,23 +1015,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py index f9e7f7608457..7b431a079080 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +21,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -47,13 +49,13 @@ def build_get_request(network_fabric_sku_name: str, subscription_id: str, **kwar _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "networkFabricSkuName": _SERIALIZER.url("network_fabric_sku_name", network_fabric_sku_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -74,12 +76,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -102,12 +104,14 @@ class NetworkFabricSkusOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: @@ -117,12 +121,11 @@ def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFab :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. :type network_fabric_sku_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabricSku or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -136,47 +139,43 @@ def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFab api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( network_fabric_sku_name=network_fabric_sku_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabricSku", pipeline_response) + deserialized = self._deserialize("NetworkFabricSku", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}" - } + return deserialized # type: ignore @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabricSku"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricSku"]: """List Network Fabric SKUs by subscription. Implements Network Fabric SKUs list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabricSku or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] :raises ~azure.core.exceptions.HttpResponseError: @@ -187,7 +186,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricSkusListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -198,15 +197,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -218,13 +215,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricSkusListResult", pipeline_response) @@ -234,23 +230,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py index dcb69c5aafc3..fcebfaa2a6b6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -246,7 +250,7 @@ def build_provision_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -255,7 +259,7 @@ def build_provision_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -279,7 +283,7 @@ def build_deprovision_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -288,7 +292,7 @@ def build_deprovision_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -313,7 +317,7 @@ def build_upgrade_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -322,7 +326,7 @@ def build_upgrade_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -348,7 +352,7 @@ def build_refresh_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -357,7 +361,7 @@ def build_refresh_configuration_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -368,7 +372,7 @@ def build_refresh_configuration_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_workload_management_bfd_configuration_request( +def build_update_workload_management_bfd_configuration_request( # pylint: disable=name-too-long resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -382,7 +386,7 @@ def build_update_workload_management_bfd_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -391,7 +395,7 @@ def build_update_workload_management_bfd_configuration_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -404,7 +408,7 @@ def build_update_workload_management_bfd_configuration_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_infra_management_bfd_configuration_request( +def build_update_infra_management_bfd_configuration_request( # pylint: disable=name-too-long resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -418,7 +422,7 @@ def build_update_infra_management_bfd_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -427,7 +431,7 @@ def build_update_infra_management_bfd_configuration_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -454,7 +458,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -463,7 +467,7 @@ def build_validate_configuration_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -489,7 +493,7 @@ def build_get_topology_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -498,7 +502,7 @@ def build_get_topology_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -522,7 +526,7 @@ def build_commit_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -531,7 +535,7 @@ def build_commit_configuration_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -554,17 +558,23 @@ class NetworkFabricsOperations: # pylint: disable=too-many-public-methods models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.NetworkFabric, IO], **kwargs: Any - ) -> _models.NetworkFabric: - error_map = { + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -577,7 +587,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -587,7 +597,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkFabric") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -595,45 +605,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabric", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } - @overload def begin_create( self, @@ -658,14 +667,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -677,7 +678,7 @@ def begin_create( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -692,18 +693,10 @@ def begin_create( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -712,7 +705,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.NetworkFabric, IO], **kwargs: Any + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkFabric]: """Create Network Fabric. @@ -723,19 +720,8 @@ def begin_create( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a NetworkFabric type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkFabric type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO[bytes] :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -762,12 +748,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -779,17 +766,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkFabric].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return LROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: @@ -802,12 +787,11 @@ def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkFabric or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,49 +805,46 @@ def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO], + body: Union[_models.NetworkFabricPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkFabric]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +857,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkFabric]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -886,7 +867,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkFabricPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -894,41 +875,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkFabric", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -954,14 +935,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -973,7 +946,7 @@ def begin_update( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -988,18 +961,10 @@ def begin_update( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -1011,7 +976,7 @@ def begin_update( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO], + body: Union[_models.NetworkFabricPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkFabric]: """Updates a Network Fabric. @@ -1023,20 +988,9 @@ def begin_update( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a IO - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkFabric or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] @@ -1063,12 +1017,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response) + deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1080,22 +1035,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkFabric].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return LROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1107,42 +1058,48 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> LROPoller[None]: @@ -1155,14 +1112,6 @@ def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwa :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -1176,7 +1125,7 @@ def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwa lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, api_version=api_version, @@ -1185,11 +1134,12 @@ def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwa params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1200,20 +1150,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkFabric"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: """List Network Fabrics by resource group. List all the Network Fabric resources in the given resource group. @@ -1221,7 +1167,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabric or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] :raises ~azure.core.exceptions.HttpResponseError: @@ -1232,7 +1177,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1243,16 +1188,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1264,13 +1207,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) @@ -1280,34 +1222,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: """List Network Fabrics by subscription. List all the Network Fabric resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkFabric or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] :raises ~azure.core.exceptions.HttpResponseError: @@ -1318,7 +1258,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1329,15 +1269,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkFabric def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1349,13 +1287,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) @@ -1365,31 +1302,28 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - } - - def _provision_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + def _provision_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1401,50 +1335,49 @@ def _provision_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_provision_request( + _request = build_provision_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._provision_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _provision_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision" - } - @distributed_trace def begin_provision( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -1458,14 +1391,6 @@ def begin_provision( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1490,12 +1415,13 @@ def begin_provision( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1507,22 +1433,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_provision.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _deprovision_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1534,50 +1458,49 @@ def _deprovision_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_deprovision_request( + _request = build_deprovision_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._deprovision_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _deprovision_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision" - } - @distributed_trace def begin_deprovision( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -1591,14 +1514,6 @@ def begin_deprovision( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1623,12 +1538,13 @@ def begin_deprovision( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1640,22 +1556,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_deprovision.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _upgrade_initial( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1668,7 +1586,7 @@ def _upgrade_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1676,9 +1594,9 @@ def _upgrade_initial( if isinstance(body, (IOBase, bytes)): _content = body else: - _json = self._serialize.body(body, "UpdateVersion") + _json = self._serialize.body(body, "UpgradeNetworkFabricProperties") - request = build_upgrade_request( + _request = build_upgrade_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -1686,49 +1604,48 @@ def _upgrade_initial( content_type=content_type, json=_json, content=_content, - template_url=self._upgrade_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _upgrade_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade" - } - @overload def begin_upgrade( self, resource_group_name: str, network_fabric_name: str, - body: _models.UpdateVersion, + body: _models.UpgradeNetworkFabricProperties, *, content_type: str = "application/json", **kwargs: Any @@ -1743,18 +1660,10 @@ def begin_upgrade( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1767,7 +1676,7 @@ def begin_upgrade( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1782,18 +1691,10 @@ def begin_upgrade( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Network Fabric properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1803,7 +1704,11 @@ def begin_upgrade( @distributed_trace def begin_upgrade( - self, resource_group_name: str, network_fabric_name: str, body: Union[_models.UpdateVersion, IO], **kwargs: Any + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1814,20 +1719,9 @@ def begin_upgrade( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a UpdateVersion type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Fabric properties to update. Is either a UpgradeNetworkFabricProperties + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1855,12 +1749,13 @@ def begin_upgrade( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1872,22 +1767,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_upgrade.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _refresh_configuration_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1899,50 +1792,49 @@ def _refresh_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_refresh_configuration_request( + _request = build_refresh_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._refresh_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _refresh_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration" - } - @distributed_trace def begin_refresh_configuration( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -1956,14 +1848,6 @@ def begin_refresh_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1988,12 +1872,13 @@ def begin_refresh_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2005,26 +1890,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_refresh_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _update_workload_management_bfd_configuration_initial( + def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2037,7 +1920,7 @@ def _update_workload_management_bfd_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -2047,7 +1930,7 @@ def _update_workload_management_bfd_configuration_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_workload_management_bfd_configuration_request( + _request = build_update_workload_management_bfd_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -2055,45 +1938,44 @@ def _update_workload_management_bfd_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_workload_management_bfd_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_workload_management_bfd_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration" - } - @overload - def begin_update_workload_management_bfd_configuration( + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -2117,14 +1999,6 @@ def begin_update_workload_management_bfd_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2133,11 +2007,11 @@ def begin_update_workload_management_bfd_configuration( """ @overload - def begin_update_workload_management_bfd_configuration( + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -2153,18 +2027,10 @@ def begin_update_workload_management_bfd_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2173,11 +2039,11 @@ def begin_update_workload_management_bfd_configuration( """ @distributed_trace - def begin_update_workload_management_bfd_configuration( + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -2190,20 +2056,9 @@ def begin_update_workload_management_bfd_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2231,12 +2086,13 @@ def begin_update_workload_management_bfd_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2248,26 +2104,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_workload_management_bfd_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _update_infra_management_bfd_configuration_initial( + def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2280,7 +2134,7 @@ def _update_infra_management_bfd_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -2290,7 +2144,7 @@ def _update_infra_management_bfd_configuration_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_infra_management_bfd_configuration_request( + _request = build_update_infra_management_bfd_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -2298,45 +2152,44 @@ def _update_infra_management_bfd_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_infra_management_bfd_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_infra_management_bfd_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration" - } - @overload - def begin_update_infra_management_bfd_configuration( + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -2360,14 +2213,6 @@ def begin_update_infra_management_bfd_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2376,11 +2221,11 @@ def begin_update_infra_management_bfd_configuration( """ @overload - def begin_update_infra_management_bfd_configuration( + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -2396,18 +2241,10 @@ def begin_update_infra_management_bfd_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2416,11 +2253,11 @@ def begin_update_infra_management_bfd_configuration( """ @distributed_trace - def begin_update_infra_management_bfd_configuration( + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -2433,20 +2270,9 @@ def begin_update_infra_management_bfd_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2474,12 +2300,13 @@ def begin_update_infra_management_bfd_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2491,26 +2318,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_infra_management_bfd_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO], + body: Union[_models.ValidateConfigurationProperties, IO[bytes]], **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2523,7 +2348,7 @@ def _validate_configuration_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -2533,7 +2358,7 @@ def _validate_configuration_initial( else: _json = self._serialize.body(body, "ValidateConfigurationProperties") - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, @@ -2541,43 +2366,42 @@ def _validate_configuration_initial( content_type=content_type, json=_json, content=_content, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration" - } - @overload def begin_validate_configuration( self, @@ -2602,14 +2426,6 @@ def begin_validate_configuration( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2622,7 +2438,7 @@ def begin_validate_configuration( self, resource_group_name: str, network_fabric_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -2637,18 +2453,10 @@ def begin_validate_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Validate configuration properties. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2661,7 +2469,7 @@ def begin_validate_configuration( self, resource_group_name: str, network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO], + body: Union[_models.ValidateConfigurationProperties, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ValidateConfigurationResponse]: """Implements the operation to the underlying resources. @@ -2674,19 +2482,9 @@ def begin_validate_configuration( :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str :param body: Validate configuration properties. Is either a ValidateConfigurationProperties - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or + IO[bytes] :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2714,12 +2512,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2731,22 +2530,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _get_topology_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2758,50 +2555,49 @@ def _get_topology_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_get_topology_request( + _request = build_get_topology_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._get_topology_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _get_topology_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology" - } - @distributed_trace def begin_get_topology( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -2815,14 +2611,6 @@ def begin_get_topology( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -2847,12 +2635,13 @@ def begin_get_topology( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2864,22 +2653,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_get_topology.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _commit_configuration_initial( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2891,50 +2678,49 @@ def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration" - } - @distributed_trace def begin_commit_configuration( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any @@ -2949,14 +2735,6 @@ def begin_commit_configuration( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -2981,12 +2759,13 @@ def begin_commit_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -2998,14 +2777,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py index 2f6ab49415f0..69ccbdae028d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -63,7 +67,7 @@ def build_create_request( "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -89,7 +93,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -99,7 +103,7 @@ def build_get_request( "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -124,7 +128,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -134,7 +138,7 @@ def build_update_request( "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -160,7 +164,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -170,7 +174,7 @@ def build_delete_request( "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -194,7 +198,7 @@ def build_list_by_network_device_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -203,7 +207,7 @@ def build_list_by_network_device_request( "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -214,7 +218,7 @@ def build_list_by_network_device_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -228,7 +232,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -238,7 +242,7 @@ def build_update_administrative_state_request( "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -263,22 +267,24 @@ class NetworkInterfacesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterface, IO], + body: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any - ) -> _models.NetworkInterface: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -291,7 +297,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -301,7 +307,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkInterface") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -310,40 +316,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkInterface", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } - @overload def begin_create( self, @@ -371,14 +375,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -391,7 +387,7 @@ def begin_create( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -408,18 +404,10 @@ def begin_create( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -432,7 +420,7 @@ def begin_create( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterface, IO], + body: Union[_models.NetworkInterface, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkInterface]: """Create NetworkInterface. @@ -446,19 +434,8 @@ def begin_create( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :param body: Request payload. Is either a NetworkInterface type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkInterface type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO[bytes] :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -486,12 +463,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -503,17 +481,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkInterface].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return LROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -530,12 +506,11 @@ def get( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -549,51 +524,48 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO], + body: Union[_models.NetworkInterfacePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkInterface]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +578,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkInterface]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -616,7 +588,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkInterfacePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -625,41 +597,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkInterface", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -688,14 +660,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -708,7 +672,7 @@ def begin_update( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -725,18 +689,10 @@ def begin_update( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -749,7 +705,7 @@ def begin_update( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO], + body: Union[_models.NetworkInterfacePatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkInterface]: """Updates a NetworkInterface. @@ -764,19 +720,8 @@ def begin_update( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: NetworkInterface properties to update. Only tags are supported. Is either a - NetworkInterfacePatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkInterfacePatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] @@ -804,12 +749,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response) + deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -821,22 +767,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkInterface].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return LROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -848,39 +792,45 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -897,14 +847,6 @@ def begin_delete( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -918,7 +860,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -928,11 +870,12 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -943,22 +886,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_network_device( self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkInterface"]: + ) -> ItemPaged["_models.NetworkInterface"]: """List all Network Interfaces that are available using an Network Device. List all the Network Interface resources in a given resource group. @@ -968,7 +907,6 @@ def list_by_network_device( :type resource_group_name: str :param network_device_name: Name of the Network Device. Required. :type network_device_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterface or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] :raises ~azure.core.exceptions.HttpResponseError: @@ -979,7 +917,7 @@ def list_by_network_device( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkInterfacesList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -990,17 +928,15 @@ def list_by_network_device( def prepare_request(next_link=None): if not next_link: - request = build_list_by_network_device_request( + _request = build_list_by_network_device_request( resource_group_name=resource_group_name, network_device_name=network_device_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_network_device.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1012,13 +948,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkInterfacesList", pipeline_response) @@ -1028,36 +963,35 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_network_device.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces" - } - def _update_administrative_state_initial( self, resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1070,7 +1004,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1080,7 +1014,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_device_name=network_device_name, network_interface_name=network_interface_name, @@ -1089,43 +1023,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1153,14 +1086,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1174,7 +1099,7 @@ def begin_update_administrative_state( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1191,18 +1116,10 @@ def begin_update_administrative_state( :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1216,7 +1133,7 @@ def begin_update_administrative_state( resource_group_name: str, network_device_name: str, network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates the admin state of the network interface. @@ -1230,20 +1147,9 @@ def begin_update_administrative_state( :type network_device_name: str :param network_interface_name: Name of the Network Interface. Required. :type network_interface_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1272,12 +1178,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1289,14 +1196,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py index 96495cb34a3c..ecf547d67a64 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,21 +249,23 @@ class NetworkPacketBrokersOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO], + body: Union[_models.NetworkPacketBroker, IO[bytes]], **kwargs: Any - ) -> _models.NetworkPacketBroker: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -272,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -282,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkPacketBroker") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, @@ -290,40 +296,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } - @overload def begin_create( self, @@ -348,14 +352,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -368,7 +364,7 @@ def begin_create( self, resource_group_name: str, network_packet_broker_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -383,18 +379,10 @@ def begin_create( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -407,7 +395,7 @@ def begin_create( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO], + body: Union[_models.NetworkPacketBroker, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkPacketBroker]: """Create Network Packet Broker. @@ -419,19 +407,9 @@ def begin_create( :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :param body: Request payload. Is either a NetworkPacketBroker type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkPacketBroker type or a IO[bytes] type. + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO[bytes] :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -459,12 +437,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -476,17 +455,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkPacketBroker].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return LROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -501,12 +478,11 @@ def get( :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkPacketBroker or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -520,49 +496,46 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO], + body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkPacketBroker]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -575,7 +548,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -585,7 +558,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkPacketBrokerPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, @@ -593,41 +566,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -653,14 +626,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -673,7 +638,7 @@ def begin_update( self, resource_group_name: str, network_packet_broker_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -688,18 +653,10 @@ def begin_update( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Network Packet Broker properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -712,7 +669,7 @@ def begin_update( self, resource_group_name: str, network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO], + body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkPacketBroker]: """Updates the Network Packet Broker. @@ -725,19 +682,8 @@ def begin_update( :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str :param body: Network Packet Broker properties to update. Is either a NetworkPacketBrokerPatch - type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of cls(response) :rtype: @@ -765,12 +711,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response) + deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -782,22 +729,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkPacketBroker].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return LROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -809,38 +754,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any) -> LROPoller[None]: @@ -853,14 +804,6 @@ def begin_delete(self, resource_group_name: str, network_packet_broker_name: str :type resource_group_name: str :param network_packet_broker_name: Name of the Network Packet Broker. Required. :type network_packet_broker_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -874,7 +817,7 @@ def begin_delete(self, resource_group_name: str, network_packet_broker_name: str lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_packet_broker_name=network_packet_broker_name, api_version=api_version, @@ -883,11 +826,12 @@ def begin_delete(self, resource_group_name: str, network_packet_broker_name: str params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -898,22 +842,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkPacketBroker"]: + ) -> ItemPaged["_models.NetworkPacketBroker"]: """List all Network Packet Brokers under resource group. Displays NetworkPacketBrokers list by resource group GET method. @@ -921,7 +861,6 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] @@ -933,7 +872,7 @@ def list_by_resource_group( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -944,16 +883,14 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -965,13 +902,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) @@ -981,34 +917,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkPacketBroker"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkPacketBroker"]: """List Network Packet Brokers by subscription. Displays Network Packet Brokers list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] @@ -1020,7 +954,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkPacket api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1031,15 +965,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkPacket def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1051,13 +983,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) @@ -1067,23 +998,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py index 3909e6bfeb5a..8dc823cff354 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -245,17 +249,23 @@ class NetworkRacksOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.NetworkRack, IO], **kwargs: Any - ) -> _models.NetworkRack: - error_map = { + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -268,7 +278,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -278,7 +288,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkRack") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, @@ -286,40 +296,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkRack", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } - @overload def begin_create( self, @@ -344,14 +352,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -363,7 +363,7 @@ def begin_create( self, resource_group_name: str, network_rack_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -378,18 +378,10 @@ def begin_create( :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -398,7 +390,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.NetworkRack, IO], **kwargs: Any + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkRack]: """Create Network Rack. @@ -409,19 +405,8 @@ def begin_create( :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :param body: Request payload. Is either a NetworkRack type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkRack type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO[bytes] :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -448,12 +433,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -465,17 +451,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkRack].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return LROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: @@ -488,12 +472,11 @@ def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) - :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkRack or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -507,45 +490,46 @@ def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore def _update_initial( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.TagsUpdate, IO], **kwargs: Any - ) -> Optional[_models.NetworkRack]: - error_map = { + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.TagsUpdate, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -558,7 +542,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkRack]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -568,7 +552,7 @@ def _update_initial( else: _json = self._serialize.body(body, "TagsUpdate") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, @@ -576,41 +560,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkRack", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -636,14 +620,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -655,7 +631,7 @@ def begin_update( self, resource_group_name: str, network_rack_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -670,18 +646,10 @@ def begin_update( :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str :param body: Network Rack properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -690,7 +658,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, network_rack_name: str, body: Union[_models.TagsUpdate, IO], **kwargs: Any + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.TagsUpdate, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkRack]: """Updates a Network Rack. @@ -701,20 +673,9 @@ def begin_update( :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO[bytes] :return: An instance of LROPoller that returns either NetworkRack or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] @@ -741,12 +702,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response) + deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -758,22 +720,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkRack].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return LROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_rack_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -785,38 +743,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_rack_name=network_rack_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> LROPoller[None]: @@ -829,14 +793,6 @@ def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwarg :type resource_group_name: str :param network_rack_name: Name of the Network Rack. Required. :type network_rack_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -850,7 +806,7 @@ def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwarg lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_rack_name=network_rack_name, api_version=api_version, @@ -859,11 +815,12 @@ def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwarg params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -874,20 +831,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkRack"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: """List Network Racks by resource group. List all Network Rack resources in the given resource group. @@ -895,7 +848,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkRack or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] :raises ~azure.core.exceptions.HttpResponseError: @@ -906,7 +858,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -917,16 +869,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -938,13 +888,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) @@ -954,34 +903,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkRack"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: """List Network Racks by subscription. List all Network Rack resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkRack or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] :raises ~azure.core.exceptions.HttpResponseError: @@ -992,7 +939,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkRack"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1003,15 +950,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkRack"] def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1023,13 +968,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) @@ -1039,23 +983,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - } diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py index 76e9a4dc24d8..5bb2cb923d78 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -233,7 +237,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -247,7 +251,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_update_administrative_state_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_resync_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_resync_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -315,7 +319,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -324,7 +328,7 @@ def build_validate_configuration_request( "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -347,21 +351,23 @@ class NetworkTapRulesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO], + body: Union[_models.NetworkTapRule, IO[bytes]], **kwargs: Any - ) -> _models.NetworkTapRule: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -374,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -384,7 +390,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkTapRule") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -392,45 +398,44 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTapRule", pipeline_response) - if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } - @overload def begin_create( self, @@ -455,14 +460,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -474,7 +471,7 @@ def begin_create( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -489,18 +486,10 @@ def begin_create( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -512,7 +501,7 @@ def begin_create( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO], + body: Union[_models.NetworkTapRule, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkTapRule]: """Create Network Tap Rule. @@ -524,19 +513,8 @@ def begin_create( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :param body: Request payload. Is either a NetworkTapRule type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkTapRule type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO[bytes] :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -563,12 +541,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -580,17 +559,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkTapRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return LROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: @@ -603,12 +580,11 @@ def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: An :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkTapRule or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -622,49 +598,46 @@ def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: An api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO], + body: Union[_models.NetworkTapRulePatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkTapRule]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -677,7 +650,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkTapRule]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -687,7 +660,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkTapRulePatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -695,41 +668,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTapRule", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -755,14 +728,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -774,7 +739,7 @@ def begin_update( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -789,18 +754,10 @@ def begin_update( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Network Tap Rule properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -812,7 +769,7 @@ def begin_update( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO], + body: Union[_models.NetworkTapRulePatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkTapRule]: """Updates a Network Tap Rule. @@ -825,19 +782,8 @@ def begin_update( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Network Tap Rule properties to update. Is either a NetworkTapRulePatch type or a - IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] @@ -864,12 +810,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response) + deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -881,22 +828,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkTapRule].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return LROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -908,42 +851,48 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, response_headers) + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> LROPoller[None]: @@ -956,14 +905,6 @@ def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **k :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -977,7 +918,7 @@ def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **k lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, api_version=api_version, @@ -986,11 +927,12 @@ def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **k params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1001,20 +943,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkTapRule"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: """List Network Tap Rules by resource group. List all the Network Tap Rule resources in the given resource group. @@ -1022,7 +960,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] :raises ~azure.core.exceptions.HttpResponseError: @@ -1033,7 +970,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1044,16 +981,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1065,13 +1000,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) @@ -1081,34 +1015,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTapRule"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: """List NetworkTapRules by subscription. List all the Network Tap Rule resources in the given subscription. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTapRule or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] :raises ~azure.core.exceptions.HttpResponseError: @@ -1119,7 +1051,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTapRul api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1130,15 +1062,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTapRul def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1150,13 +1080,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) @@ -1166,35 +1095,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - } - def _update_administrative_state_initial( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1207,7 +1135,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1217,7 +1145,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, @@ -1225,43 +1153,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1286,14 +1213,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1306,7 +1225,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_tap_rule_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1321,18 +1240,10 @@ def begin_update_administrative_state( :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1345,7 +1256,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Updates administrative state of Network Tap Rules. @@ -1357,20 +1268,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1398,12 +1298,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1415,22 +1316,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _resync_initial( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + def _resync_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1442,50 +1339,49 @@ def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync" - } - @distributed_trace def begin_resync( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any @@ -1499,14 +1395,6 @@ def begin_resync( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1531,12 +1419,13 @@ def begin_resync( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1548,22 +1437,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1575,50 +1462,49 @@ def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, network_tap_rule_name=network_tap_rule_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration" - } - @distributed_trace def begin_validate_configuration( self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any @@ -1632,14 +1518,6 @@ def begin_validate_configuration( :type resource_group_name: str :param network_tap_rule_name: Name of the Network Tap Rule. Required. :type network_tap_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1664,12 +1542,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1681,14 +1560,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py index b1c6c9d14e9a..75b3ee0ee8c2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -222,7 +226,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -233,7 +237,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -247,7 +251,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_update_administrative_state_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_resync_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_resync_request( "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -314,17 +318,19 @@ class NetworkTapsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO], **kwargs: Any - ) -> _models.NetworkTap: - error_map = { + self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -337,7 +343,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -347,7 +353,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkTap") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -355,40 +361,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkTap", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } - @overload def begin_create( self, @@ -413,14 +417,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -431,7 +427,7 @@ def begin_create( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -446,18 +442,10 @@ def begin_create( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -465,7 +453,7 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO], **kwargs: Any + self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkTap]: """Create Network Tap. @@ -476,19 +464,8 @@ def begin_create( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Request payload. Is either a NetworkTap type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkTap type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO[bytes] :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -514,12 +491,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -531,17 +509,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkTap].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return LROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: @@ -554,12 +530,11 @@ def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkTap or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -573,45 +548,46 @@ def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore def _update_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTapPatch, IO], **kwargs: Any - ) -> Optional[_models.NetworkTap]: - error_map = { + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -624,7 +600,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkTap]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -634,7 +610,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkTapPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -642,41 +618,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkTap", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -702,14 +678,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -720,7 +688,7 @@ def begin_update( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -735,18 +703,10 @@ def begin_update( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Network Tap properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -754,7 +714,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTapPatch, IO], **kwargs: Any + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.NetworkTap]: """Updates the Network Taps. @@ -765,20 +729,9 @@ def begin_update( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO[bytes] :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -804,12 +757,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response) + deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -821,22 +775,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkTap].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return LROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -848,38 +798,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> LROPoller[None]: @@ -892,14 +848,6 @@ def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -913,7 +861,7 @@ def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_tap_name=network_tap_name, api_version=api_version, @@ -922,11 +870,12 @@ def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -937,20 +886,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.NetworkTap"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: """List Network Taps by resource group. Displays Network Taps list by resource group GET method. @@ -958,7 +903,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTap or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -969,7 +913,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -980,16 +924,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1001,13 +943,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) @@ -1017,34 +958,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTap"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: """List Network Taps by subscription. Displays Network Taps list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkTap or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] :raises ~azure.core.exceptions.HttpResponseError: @@ -1055,7 +994,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTap"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1066,15 +1005,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.NetworkTap"]: def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1086,13 +1023,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) @@ -1102,35 +1038,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps" - } - def _update_administrative_state_initial( self, resource_group_name: str, network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1143,7 +1078,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1153,7 +1088,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, @@ -1161,43 +1096,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1222,14 +1156,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1242,7 +1168,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_tap_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1257,18 +1183,10 @@ def begin_update_administrative_state( :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1281,7 +1199,7 @@ def begin_update_administrative_state( self, resource_group_name: str, network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Updates administrative state of Network Tap. @@ -1293,20 +1211,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1334,12 +1241,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1351,22 +1259,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _resync_initial( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + def _resync_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1378,50 +1282,49 @@ def _resync_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_resync_request( + _request = build_resync_request( resource_group_name=resource_group_name, network_tap_name=network_tap_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._resync_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _resync_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync" - } - @distributed_trace def begin_resync( self, resource_group_name: str, network_tap_name: str, **kwargs: Any @@ -1435,14 +1338,6 @@ def begin_resync( :type resource_group_name: str :param network_tap_name: Name of the Network Tap. Required. :type network_tap_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1467,12 +1362,13 @@ def begin_resync( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1484,14 +1380,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_resync.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py index 85d7e2cd28b3..dd4cee6f357d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -57,7 +61,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -69,7 +73,7 @@ def build_create_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -99,7 +103,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -111,7 +115,7 @@ def build_get_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -140,7 +144,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -152,7 +156,7 @@ def build_update_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -182,7 +186,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -194,7 +198,7 @@ def build_delete_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -218,7 +222,7 @@ def build_list_by_network_fabric_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -227,7 +231,7 @@ def build_list_by_network_fabric_request( "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -238,7 +242,7 @@ def build_list_by_network_fabric_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_npb_static_route_bfd_administrative_state_request( +def build_update_npb_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, @@ -256,7 +260,7 @@ def build_update_npb_static_route_bfd_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -268,7 +272,7 @@ def build_update_npb_static_route_bfd_administrative_state_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -281,7 +285,7 @@ def build_update_npb_static_route_bfd_administrative_state_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, @@ -299,7 +303,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -311,7 +315,7 @@ def build_update_administrative_state_request( ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -336,22 +340,24 @@ class NetworkToNetworkInterconnectsOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO], + body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], **kwargs: Any - ) -> _models.NetworkToNetworkInterconnect: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -364,7 +370,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -374,7 +380,7 @@ def _create_initial( else: _json = self._serialize.body(body, "NetworkToNetworkInterconnect") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -383,40 +389,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } - @overload def begin_create( self, @@ -445,14 +449,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -466,7 +462,7 @@ def begin_create( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -484,18 +480,10 @@ def begin_create( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -509,7 +497,7 @@ def begin_create( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO], + body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkToNetworkInterconnect]: """Configuration used to setup CE-PE connectivity. @@ -524,20 +512,9 @@ def begin_create( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO[bytes] + type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO[bytes] :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -566,12 +543,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -583,17 +561,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return LROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get( @@ -615,12 +591,11 @@ def get( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkToNetworkInterconnect or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -634,51 +609,48 @@ def get( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore def _update_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO], + body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], **kwargs: Any - ) -> Optional[_models.NetworkToNetworkInterconnect]: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +663,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.NetworkToNetworkInterconnect]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -701,7 +673,7 @@ def _update_initial( else: _json = self._serialize.body(body, "NetworkToNetworkInterconnectPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -710,41 +682,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -774,14 +746,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -795,7 +759,7 @@ def begin_update( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -813,18 +777,10 @@ def begin_update( Required. :type network_to_network_interconnect_name: str :param body: Network to Network Interconnect properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -838,7 +794,7 @@ def begin_update( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO], + body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.NetworkToNetworkInterconnect]: """Updates a Network To NetworkInterconnects. @@ -854,19 +810,9 @@ def begin_update( Required. :type network_to_network_interconnect_name: str :param body: Network to Network Interconnect properties to update. Is either a - NetworkToNetworkInterconnectPatch type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + NetworkToNetworkInterconnectPatch type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or + IO[bytes] :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -895,12 +841,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response) + deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -912,26 +859,24 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return LROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, **kwargs: Any - ) -> None: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -943,39 +888,45 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete( @@ -997,14 +948,6 @@ def begin_delete( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -1018,7 +961,7 @@ def begin_delete( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -1028,11 +971,12 @@ def begin_delete( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -1043,22 +987,18 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_by_network_fabric( self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> Iterable["_models.NetworkToNetworkInterconnect"]: + ) -> ItemPaged["_models.NetworkToNetworkInterconnect"]: """Executes list operation to display Network To Network Interconnects within a Network Fabric. Implements Network To Network Interconnects list by Network Fabric GET method. @@ -1068,7 +1008,6 @@ def list_by_network_fabric( :type resource_group_name: str :param network_fabric_name: Name of the Network Fabric. Required. :type network_fabric_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkToNetworkInterconnect or the result of cls(response) :rtype: @@ -1081,7 +1020,7 @@ def list_by_network_fabric( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkToNetworkInterconnectsList] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1092,17 +1031,15 @@ def list_by_network_fabric( def prepare_request(next_link=None): if not next_link: - request = build_list_by_network_fabric_request( + _request = build_list_by_network_fabric_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_network_fabric.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1114,13 +1051,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("NetworkToNetworkInterconnectsList", pipeline_response) @@ -1130,36 +1066,35 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_network_fabric.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects" - } - - def _update_npb_static_route_bfd_administrative_state_initial( + def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1172,7 +1107,7 @@ def _update_npb_static_route_bfd_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1182,7 +1117,7 @@ def _update_npb_static_route_bfd_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_npb_static_route_bfd_administrative_state_request( + _request = build_update_npb_static_route_bfd_administrative_state_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -1191,45 +1126,44 @@ def _update_npb_static_route_bfd_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_npb_static_route_bfd_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_npb_static_route_bfd_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState" - } - @overload - def begin_update_npb_static_route_bfd_administrative_state( + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, @@ -1256,14 +1190,6 @@ def begin_update_npb_static_route_bfd_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1272,12 +1198,12 @@ def begin_update_npb_static_route_bfd_administrative_state( """ @overload - def begin_update_npb_static_route_bfd_administrative_state( + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1295,18 +1221,10 @@ def begin_update_npb_static_route_bfd_administrative_state( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1315,12 +1233,12 @@ def begin_update_npb_static_route_bfd_administrative_state( """ @distributed_trace - def begin_update_npb_static_route_bfd_administrative_state( + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1335,20 +1253,9 @@ def begin_update_npb_static_route_bfd_administrative_state( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1377,12 +1284,13 @@ def begin_update_npb_static_route_bfd_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1394,27 +1302,25 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_npb_static_route_bfd_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _update_administrative_state_initial( self, resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1427,7 +1333,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1437,7 +1343,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, network_fabric_name=network_fabric_name, network_to_network_interconnect_name=network_to_network_interconnect_name, @@ -1446,43 +1352,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1511,14 +1416,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1532,7 +1429,7 @@ def begin_update_administrative_state( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1550,18 +1447,10 @@ def begin_update_administrative_state( Required. :type network_to_network_interconnect_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1575,7 +1464,7 @@ def begin_update_administrative_state( resource_group_name: str, network_fabric_name: str, network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: """Implements the operation to the underlying resources. @@ -1590,20 +1479,9 @@ def begin_update_administrative_state( :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. Required. :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1632,12 +1510,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1649,14 +1528,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py index 371bfc6efbe1..e9ec188ea1a0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -19,18 +20,18 @@ ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -67,18 +68,19 @@ class Operations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: """Returns list of all operations. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Operation or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: @@ -89,7 +91,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -100,14 +102,12 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - request = build_list_request( + _request = build_list_request( api_version=api_version, - template_url=self.list.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -119,13 +119,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("OperationListResult", pipeline_response) @@ -135,21 +134,22 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - - list.metadata = {"url": "/providers/Microsoft.ManagedNetworkFabric/operations"} diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py index f7dd32510333..49900f6ab120 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py index 458941162970..8427a01e58b4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,34 +6,38 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest +from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer -from .._vendor import _convert_request, _format_url_section +from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -53,7 +57,7 @@ def build_create_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -62,7 +66,7 @@ def build_create_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -88,7 +92,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,7 +101,7 @@ def build_get_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -122,7 +126,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -131,7 +135,7 @@ def build_update_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -157,7 +161,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -166,7 +170,7 @@ def build_delete_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -188,7 +192,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -196,7 +200,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ ), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -217,12 +221,12 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -233,7 +237,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_update_administrative_state_request( +def build_update_administrative_state_request( # pylint: disable=name-too-long resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -247,7 +251,7 @@ def build_update_administrative_state_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,7 +260,7 @@ def build_update_administrative_state_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -282,7 +286,7 @@ def build_validate_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -291,7 +295,7 @@ def build_validate_configuration_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -315,7 +319,7 @@ def build_commit_configuration_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -324,7 +328,7 @@ def build_commit_configuration_request( "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), } - _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -347,17 +351,23 @@ class RoutePoliciesOperations: models = _models - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_initial( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicy, IO], **kwargs: Any - ) -> _models.RoutePolicy: - error_map = { + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -370,7 +380,7 @@ def _create_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -380,7 +390,7 @@ def _create_initial( else: _json = self._serialize.body(body, "RoutePolicy") - request = build_create_request( + _request = build_create_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -388,40 +398,38 @@ def _create_initial( content_type=content_type, json=_json, content=_content, - template_url=self._create_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize("RoutePolicy", pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - _create_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } - @overload def begin_create( self, @@ -446,14 +454,6 @@ def begin_create( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -465,7 +465,7 @@ def begin_create( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -480,18 +480,10 @@ def begin_create( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -500,7 +492,11 @@ def begin_create( @distributed_trace def begin_create( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicy, IO], **kwargs: Any + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.RoutePolicy]: """Create Route Policy. @@ -511,19 +507,8 @@ def begin_create( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Request payload. Is either a RoutePolicy type or a IO type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Request payload. Is either a RoutePolicy type or a IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO[bytes] :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -550,12 +535,13 @@ def begin_create( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -567,17 +553,15 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.RoutePolicy].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_create.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return LROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @distributed_trace def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: @@ -590,12 +574,11 @@ def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) - :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: RoutePolicy or the result of cls(response) :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -609,45 +592,46 @@ def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - request = build_get_request( + _request = build_get_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.get.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + return cls(pipeline_response, deserialized, {}) # type: ignore - get.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore def _update_initial( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicyPatch, IO], **kwargs: Any - ) -> Optional[_models.RoutePolicy]: - error_map = { + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -660,7 +644,7 @@ def _update_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Optional[_models.RoutePolicy]] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -670,7 +654,7 @@ def _update_initial( else: _json = self._serialize.body(body, "RoutePolicyPatch") - request = build_update_request( + _request = build_update_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -678,41 +662,41 @@ def _update_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("RoutePolicy", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - if cls: - return cls(pipeline_response, deserialized, response_headers) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - return deserialized + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - _update_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore @overload def begin_update( @@ -738,14 +722,6 @@ def begin_update( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -757,7 +733,7 @@ def begin_update( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -772,18 +748,10 @@ def begin_update( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Route Policy properties to update. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -792,7 +760,11 @@ def begin_update( @distributed_trace def begin_update( - self, resource_group_name: str, route_policy_name: str, body: Union[_models.RoutePolicyPatch, IO], **kwargs: Any + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, IO[bytes]], + **kwargs: Any ) -> LROPoller[_models.RoutePolicy]: """Updates a Route Policy. @@ -803,20 +775,9 @@ def begin_update( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a IO type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO[bytes] :return: An instance of LROPoller that returns either RoutePolicy or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] @@ -843,12 +804,13 @@ def begin_update( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response) + deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -860,22 +822,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.RoutePolicy].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return LROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - def _delete_initial( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> None: - error_map = { + def _delete_initial(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -887,38 +845,44 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_delete_request( + _request = build_delete_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._delete_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore - _delete_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return deserialized # type: ignore @distributed_trace def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> LROPoller[None]: @@ -931,14 +895,6 @@ def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwarg :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -952,7 +908,7 @@ def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwarg lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( # type: ignore + raw_result = self._delete_initial( resource_group_name=resource_group_name, route_policy_name=route_policy_name, api_version=api_version, @@ -961,11 +917,12 @@ def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwarg params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -976,20 +933,16 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_delete.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" - } + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.RoutePolicy"]: + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: """List RoutePolicies by resource group. Implements RoutePolicies list by resource group GET method. @@ -997,7 +950,6 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RoutePolicy or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] :raises ~azure.core.exceptions.HttpResponseError: @@ -1008,7 +960,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1019,16 +971,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - request = build_list_by_resource_group_request( + _request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_resource_group.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1040,13 +990,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) @@ -1056,34 +1005,32 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_resource_group.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - } - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.RoutePolicy"]: + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: """List RoutePolicies by subscription. Implements RoutePolicies list by subscription GET method. - :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RoutePolicy or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] :raises ~azure.core.exceptions.HttpResponseError: @@ -1094,7 +1041,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.RoutePolicy"] api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - error_map = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1105,15 +1052,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.RoutePolicy"] def prepare_request(next_link=None): if not next_link: - request = build_list_by_subscription_request( + _request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self.list_by_subscription.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version @@ -1125,13 +1070,12 @@ def prepare_request(next_link=None): } ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest( + _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - request.method = "GET" - return request + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) @@ -1141,35 +1085,34 @@ def extract_data(pipeline_response): return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): - request = prepare_request(next_link) + _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) - list_by_subscription.metadata = { - "url": "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - } - def _update_administrative_state_initial( self, resource_group_name: str, route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any - ) -> _models.CommonPostActionResponseForDeviceUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1182,7 +1125,7 @@ def _update_administrative_state_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1192,7 +1135,7 @@ def _update_administrative_state_initial( else: _json = self._serialize.body(body, "UpdateAdministrativeState") - request = build_update_administrative_state_request( + _request = build_update_administrative_state_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, @@ -1200,43 +1143,42 @@ def _update_administrative_state_initial( content_type=content_type, json=_json, content=_content, - template_url=self._update_administrative_state_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _update_administrative_state_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState" - } - @overload def begin_update_administrative_state( self, @@ -1261,14 +1203,6 @@ def begin_update_administrative_state( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1281,7 +1215,7 @@ def begin_update_administrative_state( self, resource_group_name: str, route_policy_name: str, - body: IO, + body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any @@ -1296,18 +1230,10 @@ def begin_update_administrative_state( :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str :param body: Request payload. Required. - :type body: IO + :type body: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1320,7 +1246,7 @@ def begin_update_administrative_state( self, resource_group_name: str, route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO], + body: Union[_models.UpdateAdministrativeState, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: """Executes enable operation to the underlying resources. @@ -1332,20 +1258,9 @@ def begin_update_administrative_state( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO type. + :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO - :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. - Default value is None. - :paramtype content_type: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate or the result of cls(response) :rtype: @@ -1373,12 +1288,13 @@ def begin_update_administrative_state( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1390,22 +1306,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_update_administrative_state.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState" - } + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _validate_configuration_initial( self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> _models.ValidateConfigurationResponse: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1417,50 +1331,49 @@ def _validate_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_validate_configuration_request( + _request = build_validate_configuration_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._validate_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _validate_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration" - } - @distributed_trace def begin_validate_configuration( self, resource_group_name: str, route_policy_name: str, **kwargs: Any @@ -1472,14 +1385,6 @@ def begin_validate_configuration( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the result of cls(response) :rtype: @@ -1504,12 +1409,13 @@ def begin_validate_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response) + deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1521,22 +1427,20 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_validate_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration" - } + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _commit_configuration_initial( self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> _models.CommonPostActionResponseForStateUpdate: - error_map = { + ) -> Iterator[bytes]: + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1548,50 +1452,49 @@ def _commit_configuration_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - request = build_commit_configuration_request( + _request = build_commit_configuration_request( resource_group_name=resource_group_name, route_policy_name=route_policy_name, subscription_id=self._config.subscription_id, api_version=api_version, - template_url=self._commit_configuration_initial.metadata["url"], headers=_headers, params=_params, ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) + _request.url = self._client.format_url(_request.url) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=_stream, **kwargs + _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) - if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - _commit_configuration_initial.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration" - } - @distributed_trace def begin_commit_configuration( self, resource_group_name: str, route_policy_name: str, **kwargs: Any @@ -1605,14 +1508,6 @@ def begin_commit_configuration( :type resource_group_name: str :param route_policy_name: Name of the Route Policy. Required. :type route_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this - operation to not poll, or pass in your own initialized polling object for a personal polling - strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or the result of cls(response) :rtype: @@ -1637,12 +1532,13 @@ def begin_commit_configuration( params=_params, **kwargs ) + raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response) + deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: @@ -1654,14 +1550,12 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller.from_continuation_token( + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - begin_commit_configuration.metadata = { - "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration" - } + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_swagger.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_swagger.json new file mode 100644 index 000000000000..9d0a4db2c9ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_swagger.json @@ -0,0 +1,51216 @@ +{ + "azure.mgmt.managednetworkfabric": { + "class_nodes": { + "ManagedNetworkFabricMgmtClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "access_control_lists": { + "attr_type": "AccessControlListsOperations" + }, + "internet_gateways": { + "attr_type": "InternetGatewaysOperations" + }, + "internet_gateway_rules": { + "attr_type": "InternetGatewayRulesOperations" + }, + "ip_communities": { + "attr_type": "IpCommunitiesOperations" + }, + "ip_extended_communities": { + "attr_type": "IpExtendedCommunitiesOperations" + }, + "ip_prefixes": { + "attr_type": "IpPrefixesOperations" + }, + "l2_isolation_domains": { + "attr_type": "L2IsolationDomainsOperations" + }, + "l3_isolation_domains": { + "attr_type": "L3IsolationDomainsOperations" + }, + "internal_networks": { + "attr_type": "InternalNetworksOperations" + }, + "external_networks": { + "attr_type": "ExternalNetworksOperations" + }, + "neighbor_groups": { + "attr_type": "NeighborGroupsOperations" + }, + "network_device_skus": { + "attr_type": "NetworkDeviceSkusOperations" + }, + "network_devices": { + "attr_type": "NetworkDevicesOperations" + }, + "network_interfaces": { + "attr_type": "NetworkInterfacesOperations" + }, + "network_fabric_controllers": { + "attr_type": "NetworkFabricControllersOperations" + }, + "network_fabric_skus": { + "attr_type": "NetworkFabricSkusOperations" + }, + "network_fabrics": { + "attr_type": "NetworkFabricsOperations" + }, + "network_to_network_interconnects": { + "attr_type": "NetworkToNetworkInterconnectsOperations" + }, + "network_packet_brokers": { + "attr_type": "NetworkPacketBrokersOperations" + }, + "network_racks": { + "attr_type": "NetworkRacksOperations" + }, + "network_tap_rules": { + "attr_type": "NetworkTapRulesOperations" + }, + "network_taps": { + "attr_type": "NetworkTapsOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "route_policies": { + "attr_type": "RoutePoliciesOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.aio": { + "class_nodes": { + "ManagedNetworkFabricMgmtClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "access_control_lists": { + "attr_type": "AccessControlListsOperations" + }, + "internet_gateways": { + "attr_type": "InternetGatewaysOperations" + }, + "internet_gateway_rules": { + "attr_type": "InternetGatewayRulesOperations" + }, + "ip_communities": { + "attr_type": "IpCommunitiesOperations" + }, + "ip_extended_communities": { + "attr_type": "IpExtendedCommunitiesOperations" + }, + "ip_prefixes": { + "attr_type": "IpPrefixesOperations" + }, + "l2_isolation_domains": { + "attr_type": "L2IsolationDomainsOperations" + }, + "l3_isolation_domains": { + "attr_type": "L3IsolationDomainsOperations" + }, + "internal_networks": { + "attr_type": "InternalNetworksOperations" + }, + "external_networks": { + "attr_type": "ExternalNetworksOperations" + }, + "neighbor_groups": { + "attr_type": "NeighborGroupsOperations" + }, + "network_device_skus": { + "attr_type": "NetworkDeviceSkusOperations" + }, + "network_devices": { + "attr_type": "NetworkDevicesOperations" + }, + "network_interfaces": { + "attr_type": "NetworkInterfacesOperations" + }, + "network_fabric_controllers": { + "attr_type": "NetworkFabricControllersOperations" + }, + "network_fabric_skus": { + "attr_type": "NetworkFabricSkusOperations" + }, + "network_fabrics": { + "attr_type": "NetworkFabricsOperations" + }, + "network_to_network_interconnects": { + "attr_type": "NetworkToNetworkInterconnectsOperations" + }, + "network_packet_brokers": { + "attr_type": "NetworkPacketBrokersOperations" + }, + "network_racks": { + "attr_type": "NetworkRacksOperations" + }, + "network_tap_rules": { + "attr_type": "NetworkTapRulesOperations" + }, + "network_taps": { + "attr_type": "NetworkTapsOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "route_policies": { + "attr_type": "RoutePoliciesOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.aio.operations": { + "class_nodes": { + "AccessControlListsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlListPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AccessControlList", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AccessControlList]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AccessControlList]", + "overloads": [] + } + }, + "properties": {} + }, + "ExternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ExternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_bgp_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewayRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternetGatewayRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGatewayRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGatewayRule]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewaysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGateway", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternetGateway", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGateway]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGateway]", + "overloads": [] + } + }, + "properties": {} + }, + "IpCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpExtendedCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpExtendedCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpPrefixesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefix", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefixPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpPrefix", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpPrefix]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpPrefix]", + "overloads": [] + } + }, + "properties": {} + }, + "L2IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "L2IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L2IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L2IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "L3IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "L3IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L3IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L3IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "NeighborGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroupPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NeighborGroup", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NeighborGroup]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NeighborGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDeviceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkDeviceSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDeviceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RebootProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevicePatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateVersion", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricControllersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricController", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricControllerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabricController", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricController]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricController]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabricSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabric", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_deprovision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [] + }, + "begin_get_topology": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "begin_provision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + } + ] + }, + "begin_update_infra_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_workload_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpgradeNetworkFabricProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ValidateConfigurationProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabric", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabric]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabric]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkInterface", + "overloads": [] + }, + "list_by_network_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkPacketBrokersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBroker", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBrokerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkPacketBroker", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkRacksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRack", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "TagsUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkRack", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkRack]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkRack]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkTapRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTapRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTapRule]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTap", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkTap", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTap]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTap]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkToNetworkInterconnectsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnect", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnectPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_npb_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkToNetworkInterconnect", + "overloads": [] + }, + "list_by_network_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkToNetworkInterconnect]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutePoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicyPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RoutePolicy", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RoutePolicy]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RoutePolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.models": { + "class_nodes": { + "AccessControlList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "acls_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "configuration_type": { + "attr_type": "configuration_type" + }, + "acls_url": { + "attr_type": "acls_url" + }, + "default_action": { + "attr_type": "default_action" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "last_synced_time": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "counter_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "counter_name": { + "attr_type": "counter_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "ether_types": { + "default": "none", + "param_type": "keyword_only" + }, + "fragments": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_lengths": { + "default": "none", + "param_type": "keyword_only" + }, + "ttl_values": { + "default": "none", + "param_type": "keyword_only" + }, + "dscp_markings": { + "default": "none", + "param_type": "keyword_only" + }, + "port_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ether_types": { + "attr_type": "ether_types" + }, + "fragments": { + "attr_type": "fragments" + }, + "ip_lengths": { + "attr_type": "ip_lengths" + }, + "ttl_values": { + "attr_type": "ttl_values" + }, + "dscp_markings": { + "attr_type": "dscp_markings" + }, + "port_condition": { + "attr_type": "port_condition" + }, + "protocol_types": { + "attr_type": "protocol_types" + }, + "vlan_match_condition": { + "attr_type": "vlan_match_condition" + }, + "ip_condition": { + "attr_type": "ip_condition" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "default": "none", + "param_type": "keyword_only" + }, + "sequence_number": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_address_type": { + "default": "none", + "param_type": "keyword_only" + }, + "match_conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": { + "attr_type": "match_configuration_name" + }, + "sequence_number": { + "attr_type": "sequence_number" + }, + "ip_address_type": { + "attr_type": "ip_address_type" + }, + "match_conditions": { + "attr_type": "match_conditions" + }, + "actions": { + "attr_type": "actions" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "acls_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "acls_url": { + "attr_type": "acls_url" + }, + "default_action": { + "attr_type": "default_action" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "annotation": { + "attr_type": "annotation" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "acls_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "configuration_type": { + "attr_type": "configuration_type" + }, + "acls_url": { + "attr_type": "acls_url" + }, + "default_action": { + "attr_type": "default_action" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "acls_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "acls_url": { + "attr_type": "acls_url" + }, + "default_action": { + "attr_type": "default_action" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "layer4_protocol": { + "default": null, + "param_type": "keyword_only" + }, + "port_type": { + "default": "none", + "param_type": "keyword_only" + }, + "ports": { + "default": "none", + "param_type": "keyword_only" + }, + "port_group_names": { + "default": "none", + "param_type": "keyword_only" + }, + "flags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "flags": { + "attr_type": "flags" + }, + "port_type": { + "attr_type": "port_type" + }, + "layer4_protocol": { + "attr_type": "layer4_protocol" + }, + "ports": { + "attr_type": "ports" + }, + "port_group_names": { + "attr_type": "port_group_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "acls_url": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "acls_url": { + "attr_type": "acls_url" + }, + "default_action": { + "attr_type": "default_action" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "last_synced_time": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AccessControlListsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AclActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "DROP": "DROP", + "LOG": "LOG", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Action": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActionIpCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "set": { + "default": "none", + "param_type": "keyword_only" + }, + "delete": { + "default": "none", + "param_type": "keyword_only" + }, + "add": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "set": { + "attr_type": "set" + }, + "delete": { + "attr_type": "delete" + }, + "add": { + "attr_type": "add" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ActionIpExtendedCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "set": { + "default": "none", + "param_type": "keyword_only" + }, + "delete": { + "default": "none", + "param_type": "keyword_only" + }, + "add": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "set": { + "attr_type": "set" + }, + "delete": { + "attr_type": "delete" + }, + "add": { + "attr_type": "add" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "INTERNAL": "INTERNAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AddressFamilyType": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "I_PV6": "I_PV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "MAT": "MAT", + "RMA": "RMA", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AggregateRoute": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "prefix": { + "attr_type": "prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AggregateRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ipv4_routes": { + "attr_type": "ipv4_routes" + }, + "ipv6_routes": { + "attr_type": "ipv6_routes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AllowASOverride": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLE": "DISABLE", + "ENABLE": "ENABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AnnotationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BfdAdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "MAT": "MAT", + "RMA": "RMA", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BfdConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "interval_in_milli_seconds": { + "default": "int", + "param_type": "keyword_only" + }, + "multiplier": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "administrative_state": { + "attr_type": null + }, + "interval_in_milli_seconds": { + "attr_type": "interval_in_milli_seconds" + }, + "multiplier": { + "attr_type": "multiplier" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BgpConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "default_route_originate": { + "default": "none", + "param_type": "keyword_only" + }, + "allow_as": { + "default": "int", + "param_type": "keyword_only" + }, + "allow_as_override": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_listen_range_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_listen_range_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_neighbor_address": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_neighbor_address": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "default_route_originate": { + "attr_type": "default_route_originate" + }, + "allow_as": { + "attr_type": "allow_as" + }, + "allow_as_override": { + "attr_type": "allow_as_override" + }, + "fabric_asn": { + "attr_type": null + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "ipv4_listen_range_prefixes": { + "attr_type": "ipv4_listen_range_prefixes" + }, + "ipv6_listen_range_prefixes": { + "attr_type": "ipv6_listen_range_prefixes" + }, + "ipv4_neighbor_address": { + "attr_type": "ipv4_neighbor_address" + }, + "ipv6_neighbor_address": { + "attr_type": "ipv6_neighbor_address" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "BooleanEnumProperty": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CommonDynamicMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "port_groups": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_groups": { + "attr_type": "ip_groups" + }, + "vlan_groups": { + "attr_type": "vlan_groups" + }, + "port_groups": { + "attr_type": "port_groups" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CommonMatchConditions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "protocol_types": { + "attr_type": "protocol_types" + }, + "vlan_match_condition": { + "attr_type": "vlan_match_condition" + }, + "ip_condition": { + "attr_type": "ip_condition" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CommonPostActionResponseForDeviceUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "successful_devices": { + "default": "none", + "param_type": "keyword_only" + }, + "failed_devices": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_state": { + "attr_type": null + }, + "successful_devices": { + "attr_type": "successful_devices" + }, + "failed_devices": { + "attr_type": "failed_devices" + }, + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CommonPostActionResponseForStateUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_state": { + "attr_type": null + }, + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CommunityActionTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "DENY": "DENY", + "PERMIT": "PERMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Condition": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESSER_THAN_OR_EQUAL_TO": "LESSER_THAN_OR_EQUAL_TO", + "RANGE": "RANGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPTED": "ACCEPTED", + "DEFERRED_CONTROL": "DEFERRED_CONTROL", + "DEPROVISIONED": "DEPROVISIONED", + "DEPROVISIONING": "DEPROVISIONING", + "ERROR_DEPROVISIONING": "ERROR_DEPROVISIONING", + "ERROR_PROVISIONING": "ERROR_PROVISIONING", + "FAILED": "FAILED", + "PENDING_COMMIT": "PENDING_COMMIT", + "PROVISIONED": "PROVISIONED", + "PROVISIONING": "PROVISIONING", + "REJECTED": "REJECTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConfigurationType": { + "type": "Enum", + "methods": {}, + "properties": { + "FILE": "FILE", + "INLINE": "INLINE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectedSubnet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "prefix": { + "attr_type": "prefix" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ConnectedSubnetRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ControllerServices": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_address_spaces": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_address_spaces": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ipv4_address_spaces": { + "attr_type": "ipv4_address_spaces" + }, + "ipv6_address_spaces": { + "attr_type": "ipv6_address_spaces" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_type": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_id": { + "default": "none", + "param_type": "keyword_only" + }, + "isolation_domain_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_tap_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "destination_type": { + "attr_type": "destination_type" + }, + "destination_id": { + "attr_type": "destination_id" + }, + "isolation_domain_properties": { + "attr_type": "isolation_domain_properties" + }, + "destination_tap_rule_id": { + "attr_type": "destination_tap_rule_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIRECT": "DIRECT", + "ISOLATION_DOMAIN": "ISOLATION_DOMAIN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceAdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "GRACEFUL_QUARANTINE": "GRACEFUL_QUARANTINE", + "QUARANTINE": "QUARANTINE", + "RESYNC": "RESYNC", + "RMA": "RMA", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceInterfaceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "interface_type": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_connector_types": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "identifier": { + "attr_type": "identifier" + }, + "interface_type": { + "attr_type": "interface_type" + }, + "supported_connector_types": { + "attr_type": "supported_connector_types" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EnableDisableOnResources": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_ids": { + "attr_type": "resource_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EnableDisableState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLE": "DISABLE", + "ENABLE": "ENABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Encapsulation": { + "type": "Enum", + "methods": {}, + "properties": { + "GRE": "GRE", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EncapsulationType": { + "type": "Enum", + "methods": {}, + "properties": { + "GT_PV1": "GT_PV1", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": { + "attr_type": "export_ipv4_route_policy_id" + }, + "export_ipv6_route_policy_id": { + "attr_type": "export_ipv6_route_policy_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportRoutePolicyInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": { + "attr_type": "export_ipv4_route_policy_id" + }, + "export_ipv6_route_policy_id": { + "attr_type": "export_ipv6_route_policy_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExpressRouteConnectionInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "express_route_circuit_id": { + "default": null, + "param_type": "keyword_only" + }, + "express_route_authorization_key": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "express_route_circuit_id": { + "attr_type": "express_route_circuit_id" + }, + "express_route_authorization_key": { + "attr_type": "express_route_authorization_key" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExtendedLocation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Extension": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_EXTENSION": "NO_EXTENSION", + "NPB": "NPB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExtensionEnumProperty": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "extension": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "extension": { + "attr_type": "extension" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetwork": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "peering_option": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "peering_option": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "peering_option": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkPatchPropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "fabric_asn": { + "attr_type": null + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "peering_option": { + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworkPropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "fabric_asn": { + "attr_type": null + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExternalNetworksList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FabricSkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "MULTI_RACK": "MULTI_RACK", + "SINGLE_RACK": "SINGLE_RACK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GatewayType": { + "type": "Enum", + "methods": {}, + "properties": { + "INFRASTRUCTURE": "INFRASTRUCTURE", + "WORKLOAD": "WORKLOAD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IPAddressType": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "I_PV6": "I_PV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ImportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": { + "attr_type": "import_ipv4_route_policy_id" + }, + "import_ipv6_route_policy_id": { + "attr_type": "import_ipv6_route_policy_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ImportRoutePolicyInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": { + "attr_type": "import_ipv4_route_policy_id" + }, + "import_ipv6_route_policy_id": { + "attr_type": "import_ipv6_route_policy_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InterfaceType": { + "type": "Enum", + "methods": {}, + "properties": { + "DATA": "DATA", + "MANAGEMENT": "MANAGEMENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "InternalNetwork": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "vlan_id": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "extension": { + "default": "str", + "param_type": "keyword_only" + }, + "bgp_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "mtu": { + "attr_type": "mtu" + }, + "connected_i_pv4_subnets": { + "attr_type": "connected_i_pv4_subnets" + }, + "connected_i_pv6_subnets": { + "attr_type": "connected_i_pv6_subnets" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "is_monitoring_enabled": { + "attr_type": "is_monitoring_enabled" + }, + "extension": { + "attr_type": "extension" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "bgp_configuration": { + "attr_type": "bgp_configuration" + }, + "static_route_configuration": { + "attr_type": "static_route_configuration" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "bgp_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "mtu": { + "attr_type": "mtu" + }, + "connected_i_pv4_subnets": { + "attr_type": "connected_i_pv4_subnets" + }, + "connected_i_pv6_subnets": { + "attr_type": "connected_i_pv6_subnets" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "is_monitoring_enabled": { + "attr_type": "is_monitoring_enabled" + }, + "bgp_configuration": { + "attr_type": "bgp_configuration" + }, + "static_route_configuration": { + "attr_type": "static_route_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "bgp_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "connected_i_pv4_subnets": { + "attr_type": "connected_i_pv4_subnets" + }, + "connected_i_pv6_subnets": { + "attr_type": "connected_i_pv6_subnets" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "is_monitoring_enabled": { + "attr_type": "is_monitoring_enabled" + }, + "bgp_configuration": { + "attr_type": "bgp_configuration" + }, + "static_route_configuration": { + "attr_type": "static_route_configuration" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "connected_i_pv4_subnets": { + "attr_type": "connected_i_pv4_subnets" + }, + "connected_i_pv6_subnets": { + "attr_type": "connected_i_pv6_subnets" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "is_monitoring_enabled": { + "attr_type": "is_monitoring_enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "vlan_id": { + "default": null, + "param_type": "keyword_only" + }, + "extension": { + "default": "str", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "bgp_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "extension": { + "attr_type": "extension" + }, + "mtu": { + "attr_type": "mtu" + }, + "connected_i_pv4_subnets": { + "attr_type": "connected_i_pv4_subnets" + }, + "connected_i_pv6_subnets": { + "attr_type": "connected_i_pv6_subnets" + }, + "import_route_policy_id": { + "attr_type": "import_route_policy_id" + }, + "export_route_policy_id": { + "attr_type": "export_route_policy_id" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "is_monitoring_enabled": { + "attr_type": "is_monitoring_enabled" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "bgp_configuration": { + "attr_type": "bgp_configuration" + }, + "static_route_configuration": { + "attr_type": "static_route_configuration" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkPropertiesBgpConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "default_route_originate": { + "default": "none", + "param_type": "keyword_only" + }, + "allow_as": { + "default": "int", + "param_type": "keyword_only" + }, + "allow_as_override": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_listen_range_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_listen_range_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_neighbor_address": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_neighbor_address": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "default_route_originate": { + "attr_type": "default_route_originate" + }, + "allow_as": { + "attr_type": "allow_as" + }, + "allow_as_override": { + "attr_type": "allow_as_override" + }, + "fabric_asn": { + "attr_type": null + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "ipv4_listen_range_prefixes": { + "attr_type": "ipv4_listen_range_prefixes" + }, + "ipv6_listen_range_prefixes": { + "attr_type": "ipv6_listen_range_prefixes" + }, + "ipv4_neighbor_address": { + "attr_type": "ipv4_neighbor_address" + }, + "ipv6_neighbor_address": { + "attr_type": "ipv6_neighbor_address" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworkPropertiesStaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "extension": { + "default": "str", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "extension": { + "attr_type": "extension" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ipv4_routes": { + "attr_type": "ipv4_routes" + }, + "ipv6_routes": { + "attr_type": "ipv6_routes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternalNetworksList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGateway": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "type_properties_type": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_controller_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "internet_gateway_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "internet_gateway_rule_id": { + "attr_type": "internet_gateway_rule_id" + }, + "ipv4_address": { + "attr_type": null + }, + "port": { + "attr_type": null + }, + "type_properties_type": { + "attr_type": "type_properties_type" + }, + "network_fabric_controller_id": { + "attr_type": "network_fabric_controller_id" + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "internet_gateway_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "internet_gateway_rule_id": { + "attr_type": "internet_gateway_rule_id" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "internet_gateway_rule_id": { + "attr_type": "internet_gateway_rule_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_controller_id": { + "default": null, + "param_type": "keyword_only" + }, + "internet_gateway_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "internet_gateway_rule_id": { + "attr_type": "internet_gateway_rule_id" + }, + "ipv4_address": { + "attr_type": null + }, + "port": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "network_fabric_controller_id": { + "attr_type": "network_fabric_controller_id" + }, + "provisioning_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "rule_properties": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "rule_properties": { + "attr_type": "rule_properties" + }, + "provisioning_state": { + "attr_type": null + }, + "internet_gateway_ids": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayRulePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_properties": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rule_properties": { + "attr_type": "rule_properties" + }, + "provisioning_state": { + "attr_type": null + }, + "internet_gateway_ids": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewayRulesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "InternetGatewaysListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunitiesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_community_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "ip_community_rules": { + "attr_type": "ip_community_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityAddOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "add": { + "attr_type": "add" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityDeleteOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "delete": { + "attr_type": "delete" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityIdList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_community_ids": { + "attr_type": "ip_community_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_community_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_community_rules": { + "attr_type": "ip_community_rules" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_community_rules": { + "attr_type": "ip_community_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_community_rules": { + "attr_type": "ip_community_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunityRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "default": null, + "param_type": "keyword_only" + }, + "community_members": { + "default": null, + "param_type": "keyword_only" + }, + "well_known_communities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "action": { + "attr_type": "action" + }, + "sequence_number": { + "attr_type": "sequence_number" + }, + "well_known_communities": { + "attr_type": "well_known_communities" + }, + "community_members": { + "attr_type": "community_members" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpCommunitySetOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "set": { + "attr_type": "set" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_rules": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "ip_extended_community_rules": { + "attr_type": "ip_extended_community_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityAddOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "add": { + "attr_type": "add" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityDeleteOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "delete": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "delete": { + "attr_type": "delete" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityIdList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_ids": { + "attr_type": "ip_extended_community_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_extended_community_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_rules": { + "attr_type": "ip_extended_community_rules" + }, + "annotation": { + "attr_type": "annotation" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_rules": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "ip_extended_community_rules": { + "attr_type": "ip_extended_community_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_rules": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_rules": { + "attr_type": "ip_extended_community_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_rules": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_rules": { + "attr_type": "ip_extended_community_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunityRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "action": { + "attr_type": "action" + }, + "sequence_number": { + "attr_type": "sequence_number" + }, + "route_targets": { + "attr_type": "route_targets" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpExtendedCommunitySetOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "set": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "set": { + "attr_type": "set" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_address_type": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "ip_address_type": { + "attr_type": "ip_address_type" + }, + "ip_prefixes": { + "attr_type": "ip_prefixes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "prefix_type": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_prefix_values": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_group_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "prefix_type": { + "attr_type": "prefix_type" + }, + "ip_prefix_values": { + "attr_type": "ip_prefix_values" + }, + "ip_group_names": { + "attr_type": "ip_group_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefix": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_prefix_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "ip_prefix_rules": { + "attr_type": "ip_prefix_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_prefix_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "ip_prefix_rules": { + "attr_type": "ip_prefix_rules" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_prefix_rules": { + "attr_type": "ip_prefix_rules" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_prefix_rules": { + "attr_type": "ip_prefix_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_prefix_rules": { + "attr_type": "ip_prefix_rules" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "default": null, + "param_type": "keyword_only" + }, + "network_prefix": { + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "default": "none", + "param_type": "keyword_only" + }, + "subnet_mask_length": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "action": { + "attr_type": "action" + }, + "sequence_number": { + "attr_type": "sequence_number" + }, + "network_prefix": { + "attr_type": "network_prefix" + }, + "condition": { + "attr_type": "condition" + }, + "subnet_mask_length": { + "attr_type": "subnet_mask_length" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpPrefixesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IsManagementType": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsMonitoringEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsWorkloadManagementNetworkEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "encapsulation": { + "default": "none", + "param_type": "keyword_only" + }, + "neighbor_group_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "encapsulation": { + "attr_type": "encapsulation" + }, + "neighbor_group_ids": { + "attr_type": "neighbor_group_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L2IsolationDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "mtu": { + "attr_type": "mtu" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L2IsolationDomainPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "mtu": { + "attr_type": "mtu" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L2IsolationDomainPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L2IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "mtu": { + "attr_type": "mtu" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L2IsolationDomainsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3ExportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": { + "attr_type": "export_ipv4_route_policy_id" + }, + "export_ipv6_route_policy_id": { + "attr_type": "export_ipv6_route_policy_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "redistribute_connected_subnets": { + "default": "str", + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "default": "str", + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "redistribute_connected_subnets": { + "attr_type": "redistribute_connected_subnets" + }, + "redistribute_static_routes": { + "attr_type": "redistribute_static_routes" + }, + "aggregate_route_configuration": { + "attr_type": "aggregate_route_configuration" + }, + "connected_subnet_route_policy": { + "attr_type": "connected_subnet_route_policy" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomainPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "redistribute_connected_subnets": { + "default": "str", + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "default": "str", + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "redistribute_connected_subnets": { + "attr_type": "redistribute_connected_subnets" + }, + "redistribute_static_routes": { + "attr_type": "redistribute_static_routes" + }, + "aggregate_route_configuration": { + "attr_type": "aggregate_route_configuration" + }, + "connected_subnet_route_policy": { + "attr_type": "connected_subnet_route_policy" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomainPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "redistribute_connected_subnets": { + "default": "str", + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "default": "str", + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "redistribute_connected_subnets": { + "attr_type": "redistribute_connected_subnets" + }, + "redistribute_static_routes": { + "attr_type": "redistribute_static_routes" + }, + "aggregate_route_configuration": { + "attr_type": "aggregate_route_configuration" + }, + "connected_subnet_route_policy": { + "attr_type": "connected_subnet_route_policy" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomainPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "redistribute_connected_subnets": { + "default": "str", + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "default": "str", + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "redistribute_connected_subnets": { + "attr_type": "redistribute_connected_subnets" + }, + "redistribute_static_routes": { + "attr_type": "redistribute_static_routes" + }, + "aggregate_route_configuration": { + "attr_type": "aggregate_route_configuration" + }, + "connected_subnet_route_policy": { + "attr_type": "connected_subnet_route_policy" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "redistribute_connected_subnets": { + "default": "str", + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "default": "str", + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "redistribute_connected_subnets": { + "attr_type": "redistribute_connected_subnets" + }, + "redistribute_static_routes": { + "attr_type": "redistribute_static_routes" + }, + "aggregate_route_configuration": { + "attr_type": "aggregate_route_configuration" + }, + "connected_subnet_route_policy": { + "attr_type": "connected_subnet_route_policy" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3IsolationDomainsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3OptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "fabric_asn": { + "attr_type": null + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "L3OptionBProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "import_route_targets": { + "attr_type": "import_route_targets" + }, + "export_route_targets": { + "attr_type": "export_route_targets" + }, + "route_targets": { + "attr_type": "route_targets" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Layer2Configuration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "interfaces": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "interfaces": { + "attr_type": "interfaces" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Layer3IpPrefixProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Layer4Protocol": { + "type": "Enum", + "methods": {}, + "properties": { + "TCP": "TCP", + "UDP": "UDP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagedResourceGroupConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "location": { + "attr_type": "location" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagementNetworkConfigurationPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_vpn_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "workload_vpn_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "infrastructure_vpn_configuration": { + "attr_type": "infrastructure_vpn_configuration" + }, + "workload_vpn_configuration": { + "attr_type": "workload_vpn_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagementNetworkConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_vpn_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "workload_vpn_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "infrastructure_vpn_configuration": { + "attr_type": "infrastructure_vpn_configuration" + }, + "workload_vpn_configuration": { + "attr_type": "workload_vpn_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborAddress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "address": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "address": { + "attr_type": "address" + }, + "configuration_state": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "destination": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "destination": { + "attr_type": "destination" + }, + "network_tap_ids": { + "attr_type": null + }, + "network_tap_rule_ids": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_addresses": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_addresses": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ipv4_addresses": { + "attr_type": "ipv4_addresses" + }, + "ipv6_addresses": { + "attr_type": "ipv6_addresses" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "destination": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "destination": { + "attr_type": "destination" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "destination": { + "attr_type": "destination" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "destination": { + "attr_type": "destination" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "destination": { + "attr_type": "destination" + }, + "network_tap_ids": { + "attr_type": null + }, + "network_tap_rule_ids": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NeighborGroupsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDevice": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "network_device_sku": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "host_name": { + "attr_type": "host_name" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "version": { + "attr_type": null + }, + "network_device_sku": { + "attr_type": "network_device_sku" + }, + "network_device_role": { + "attr_type": null + }, + "network_rack_id": { + "attr_type": null + }, + "management_ipv4_address": { + "attr_type": null + }, + "management_ipv6_address": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDevicePatchParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "host_name": { + "attr_type": "host_name" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDevicePatchParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDevicePatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "network_device_sku": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "host_name": { + "attr_type": "host_name" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "version": { + "attr_type": null + }, + "network_device_sku": { + "attr_type": "network_device_sku" + }, + "network_device_role": { + "attr_type": null + }, + "network_rack_id": { + "attr_type": null + }, + "management_ipv4_address": { + "attr_type": null + }, + "management_ipv6_address": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDeviceRole": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "MANAGEMENT": "MANAGEMENT", + "NPB": "NPB", + "TO_R": "TO_R", + "TS": "TS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkDeviceRoleName": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "MANAGEMENT": "MANAGEMENT", + "NPB": "NPB", + "TO_R": "TO_R", + "TS": "TS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkDeviceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "model": { + "default": null, + "param_type": "keyword_only" + }, + "manufacturer": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_versions": { + "default": "none", + "param_type": "keyword_only" + }, + "supported_role_types": { + "default": "none", + "param_type": "keyword_only" + }, + "interfaces": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "model": { + "attr_type": "model" + }, + "manufacturer": { + "attr_type": "manufacturer" + }, + "supported_versions": { + "attr_type": "supported_versions" + }, + "supported_role_types": { + "attr_type": "supported_role_types" + }, + "interfaces": { + "attr_type": "interfaces" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDeviceSkusListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkDevicesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabric": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_sku": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_controller_id": { + "default": null, + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "default": null, + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "default": null, + "param_type": "keyword_only" + }, + "fabric_asn": { + "default": null, + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "management_network_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "fabric_version": { + "default": "none", + "param_type": "keyword_only" + }, + "rack_count": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_fabric_sku": { + "attr_type": "network_fabric_sku" + }, + "fabric_version": { + "attr_type": "fabric_version" + }, + "router_ids": { + "attr_type": null + }, + "network_fabric_controller_id": { + "attr_type": "network_fabric_controller_id" + }, + "rack_count": { + "attr_type": "rack_count" + }, + "server_count_per_rack": { + "attr_type": "server_count_per_rack" + }, + "ipv4_prefix": { + "attr_type": "ipv4_prefix" + }, + "ipv6_prefix": { + "attr_type": "ipv6_prefix" + }, + "fabric_asn": { + "attr_type": "fabric_asn" + }, + "terminal_server_configuration": { + "attr_type": "terminal_server_configuration" + }, + "management_network_configuration": { + "attr_type": "management_network_configuration" + }, + "racks": { + "attr_type": null + }, + "l2_isolation_domains": { + "attr_type": null + }, + "l3_isolation_domains": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricController": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "infrastructure_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_resource_group_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "is_workload_management_network_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "ipv4_address_space": { + "default": "str", + "param_type": "keyword_only" + }, + "ipv6_address_space": { + "default": "str", + "param_type": "keyword_only" + }, + "nfc_sku": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "infrastructure_express_route_connections": { + "attr_type": "infrastructure_express_route_connections" + }, + "workload_express_route_connections": { + "attr_type": "workload_express_route_connections" + }, + "infrastructure_services": { + "attr_type": null + }, + "workload_services": { + "attr_type": null + }, + "managed_resource_group_configuration": { + "attr_type": "managed_resource_group_configuration" + }, + "network_fabric_ids": { + "attr_type": null + }, + "workload_management_network": { + "attr_type": null + }, + "is_workload_management_network_enabled": { + "attr_type": "is_workload_management_network_enabled" + }, + "tenant_internet_gateway_ids": { + "attr_type": null + }, + "ipv4_address_space": { + "attr_type": "ipv4_address_space" + }, + "ipv6_address_space": { + "attr_type": "ipv6_address_space" + }, + "nfc_sku": { + "attr_type": "nfc_sku" + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricControllerPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "infrastructure_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "infrastructure_express_route_connections": { + "attr_type": "infrastructure_express_route_connections" + }, + "workload_express_route_connections": { + "attr_type": "workload_express_route_connections" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricControllerPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "infrastructure_express_route_connections": { + "attr_type": "infrastructure_express_route_connections" + }, + "workload_express_route_connections": { + "attr_type": "workload_express_route_connections" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricControllerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_resource_group_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "is_workload_management_network_enabled": { + "default": "str", + "param_type": "keyword_only" + }, + "ipv4_address_space": { + "default": "str", + "param_type": "keyword_only" + }, + "ipv6_address_space": { + "default": "str", + "param_type": "keyword_only" + }, + "nfc_sku": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "infrastructure_express_route_connections": { + "attr_type": "infrastructure_express_route_connections" + }, + "workload_express_route_connections": { + "attr_type": "workload_express_route_connections" + }, + "infrastructure_services": { + "attr_type": null + }, + "workload_services": { + "attr_type": null + }, + "managed_resource_group_configuration": { + "attr_type": "managed_resource_group_configuration" + }, + "network_fabric_ids": { + "attr_type": null + }, + "workload_management_network": { + "attr_type": null + }, + "is_workload_management_network_enabled": { + "attr_type": "is_workload_management_network_enabled" + }, + "tenant_internet_gateway_ids": { + "attr_type": null + }, + "ipv4_address_space": { + "attr_type": "ipv4_address_space" + }, + "ipv6_address_space": { + "attr_type": "ipv6_address_space" + }, + "nfc_sku": { + "attr_type": "nfc_sku" + }, + "provisioning_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricControllersListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "rack_count": { + "default": "none", + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "fabric_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "management_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "rack_count": { + "attr_type": "rack_count" + }, + "server_count_per_rack": { + "attr_type": "server_count_per_rack" + }, + "ipv4_prefix": { + "attr_type": "ipv4_prefix" + }, + "ipv6_prefix": { + "attr_type": "ipv6_prefix" + }, + "fabric_asn": { + "attr_type": "fabric_asn" + }, + "terminal_server_configuration": { + "attr_type": "terminal_server_configuration" + }, + "management_network_configuration": { + "attr_type": "management_network_configuration" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rack_count": { + "default": "none", + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "fabric_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "management_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rack_count": { + "attr_type": "rack_count" + }, + "server_count_per_rack": { + "attr_type": "server_count_per_rack" + }, + "ipv4_prefix": { + "attr_type": "ipv4_prefix" + }, + "ipv6_prefix": { + "attr_type": "ipv6_prefix" + }, + "fabric_asn": { + "attr_type": "fabric_asn" + }, + "terminal_server_configuration": { + "attr_type": "terminal_server_configuration" + }, + "management_network_configuration": { + "attr_type": "management_network_configuration" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "rack_count": { + "default": "none", + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "fabric_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "management_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "rack_count": { + "attr_type": "rack_count" + }, + "server_count_per_rack": { + "attr_type": "server_count_per_rack" + }, + "ipv4_prefix": { + "attr_type": "ipv4_prefix" + }, + "ipv6_prefix": { + "attr_type": "ipv6_prefix" + }, + "fabric_asn": { + "attr_type": "fabric_asn" + }, + "terminal_server_configuration": { + "attr_type": "terminal_server_configuration" + }, + "management_network_configuration": { + "attr_type": "management_network_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricPatchablePropertiesTerminalServerConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "username": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "username": { + "attr_type": "username" + }, + "password": { + "attr_type": "password" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_controller_id": { + "default": null, + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "default": null, + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "default": null, + "param_type": "keyword_only" + }, + "fabric_asn": { + "default": null, + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "management_network_configuration": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "fabric_version": { + "default": "none", + "param_type": "keyword_only" + }, + "rack_count": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_fabric_sku": { + "attr_type": "network_fabric_sku" + }, + "fabric_version": { + "attr_type": "fabric_version" + }, + "router_ids": { + "attr_type": null + }, + "network_fabric_controller_id": { + "attr_type": "network_fabric_controller_id" + }, + "rack_count": { + "attr_type": "rack_count" + }, + "server_count_per_rack": { + "attr_type": "server_count_per_rack" + }, + "ipv4_prefix": { + "attr_type": "ipv4_prefix" + }, + "ipv6_prefix": { + "attr_type": "ipv6_prefix" + }, + "fabric_asn": { + "attr_type": "fabric_asn" + }, + "terminal_server_configuration": { + "attr_type": "terminal_server_configuration" + }, + "management_network_configuration": { + "attr_type": "management_network_configuration" + }, + "racks": { + "attr_type": null + }, + "l2_isolation_domains": { + "attr_type": null + }, + "l3_isolation_domains": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_compute_racks": { + "default": "none", + "param_type": "keyword_only" + }, + "maximum_server_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type_properties_type": { + "attr_type": null + }, + "max_compute_racks": { + "attr_type": "max_compute_racks" + }, + "maximum_server_count": { + "attr_type": "maximum_server_count" + }, + "supported_versions": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricSkusListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkFabricUpgradeAction": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETE": "COMPLETE", + "START": "START", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkFabricsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkInterface": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "physical_identifier": { + "attr_type": null + }, + "connected_to": { + "attr_type": null + }, + "interface_type": { + "attr_type": null + }, + "ipv4_address": { + "attr_type": null + }, + "ipv6_address": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkInterfacePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkInterfacePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkInterfaceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "physical_identifier": { + "attr_type": null + }, + "connected_to": { + "attr_type": null + }, + "interface_type": { + "attr_type": null + }, + "ipv4_address": { + "attr_type": null + }, + "ipv6_address": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkInterfacesList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkPacketBroker": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "network_device_ids": { + "attr_type": null + }, + "source_interface_ids": { + "attr_type": null + }, + "network_tap_ids": { + "attr_type": null + }, + "neighbor_group_ids": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkPacketBrokerPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkPacketBrokersListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkRack": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "network_rack_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_rack_type": { + "attr_type": "network_rack_type" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "network_devices": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkRackProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "network_rack_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_rack_type": { + "attr_type": "network_rack_type" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "network_devices": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkRackType": { + "type": "Enum", + "methods": {}, + "properties": { + "AGGREGATE": "AGGREGATE", + "COMBINED": "COMBINED", + "COMPUTE": "COMPUTE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkRacksListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTap": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_packet_broker_id": { + "default": null, + "param_type": "keyword_only" + }, + "destinations": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "network_packet_broker_id": { + "attr_type": "network_packet_broker_id" + }, + "source_tap_rule_id": { + "attr_type": null + }, + "destinations": { + "attr_type": "destinations" + }, + "polling_type": { + "attr_type": "polling_type" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_type": { + "default": "none", + "param_type": "keyword_only" + }, + "destinations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "polling_type": { + "attr_type": "polling_type" + }, + "destinations": { + "attr_type": "destinations" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapPatchableParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_type": { + "default": "none", + "param_type": "keyword_only" + }, + "destinations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "polling_type": { + "attr_type": "polling_type" + }, + "destinations": { + "attr_type": "destinations" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapPatchableParametersDestinationsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_type": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_id": { + "default": "none", + "param_type": "keyword_only" + }, + "isolation_domain_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_tap_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "destination_type": { + "attr_type": "destination_type" + }, + "destination_id": { + "attr_type": "destination_id" + }, + "isolation_domain_properties": { + "attr_type": "isolation_domain_properties" + }, + "destination_tap_rule_id": { + "attr_type": "destination_tap_rule_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_id": { + "default": null, + "param_type": "keyword_only" + }, + "destinations": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_packet_broker_id": { + "attr_type": "network_packet_broker_id" + }, + "source_tap_rule_id": { + "attr_type": null + }, + "destinations": { + "attr_type": "destinations" + }, + "polling_type": { + "attr_type": "polling_type" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapPropertiesDestinationsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_type": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_id": { + "default": "none", + "param_type": "keyword_only" + }, + "isolation_domain_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_tap_rule_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "destination_type": { + "attr_type": "destination_type" + }, + "destination_id": { + "attr_type": "destination_id" + }, + "isolation_domain_properties": { + "attr_type": "isolation_domain_properties" + }, + "destination_tap_rule_id": { + "attr_type": "destination_tap_rule_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "tap_rules_url": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_interval_in_seconds": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "configuration_type": { + "attr_type": "configuration_type" + }, + "tap_rules_url": { + "attr_type": "tap_rules_url" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "network_tap_id": { + "attr_type": null + }, + "polling_interval_in_seconds": { + "attr_type": "polling_interval_in_seconds" + }, + "last_synced_time": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRuleAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "truncate": { + "default": "none", + "param_type": "keyword_only" + }, + "is_timestamp_enabled": { + "default": "none", + "param_type": "keyword_only" + }, + "destination_id": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configuration_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": "type" + }, + "truncate": { + "attr_type": "truncate" + }, + "is_timestamp_enabled": { + "attr_type": "is_timestamp_enabled" + }, + "destination_id": { + "attr_type": "destination_id" + }, + "match_configuration_name": { + "attr_type": "match_configuration_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRuleMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "encapsulation_type": { + "default": "str", + "param_type": "keyword_only" + }, + "port_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "encapsulation_type": { + "attr_type": "encapsulation_type" + }, + "port_condition": { + "attr_type": "port_condition" + }, + "protocol_types": { + "attr_type": "protocol_types" + }, + "vlan_match_condition": { + "attr_type": "vlan_match_condition" + }, + "ip_condition": { + "attr_type": "ip_condition" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRuleMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "default": "none", + "param_type": "keyword_only" + }, + "sequence_number": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_address_type": { + "default": "none", + "param_type": "keyword_only" + }, + "match_conditions": { + "default": "none", + "param_type": "keyword_only" + }, + "actions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": { + "attr_type": "match_configuration_name" + }, + "sequence_number": { + "attr_type": "sequence_number" + }, + "ip_address_type": { + "attr_type": "ip_address_type" + }, + "match_conditions": { + "attr_type": "match_conditions" + }, + "actions": { + "attr_type": "actions" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRulePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "tap_rules_url": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "configuration_type": { + "attr_type": "configuration_type" + }, + "tap_rules_url": { + "attr_type": "tap_rules_url" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRulePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "tap_rules_url": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "tap_rules_url": { + "attr_type": "tap_rules_url" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRulePatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "tap_rules_url": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "tap_rules_url": { + "attr_type": "tap_rules_url" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "default": "none", + "param_type": "keyword_only" + }, + "tap_rules_url": { + "default": "none", + "param_type": "keyword_only" + }, + "match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "polling_interval_in_seconds": { + "default": "int", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_type": { + "attr_type": "configuration_type" + }, + "tap_rules_url": { + "attr_type": "tap_rules_url" + }, + "match_configurations": { + "attr_type": "match_configurations" + }, + "dynamic_match_configurations": { + "attr_type": "dynamic_match_configurations" + }, + "network_tap_id": { + "attr_type": null + }, + "polling_interval_in_seconds": { + "attr_type": "polling_interval_in_seconds" + }, + "last_synced_time": { + "attr_type": null + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapRulesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkTapsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkToNetworkInterconnect": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "use_option_b": { + "default": null, + "param_type": "keyword_only" + }, + "nni_type": { + "default": "str", + "param_type": "keyword_only" + }, + "is_management_type": { + "default": "str", + "param_type": "keyword_only" + }, + "layer2_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_layer3_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "npb_static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "nni_type": { + "attr_type": "nni_type" + }, + "is_management_type": { + "attr_type": "is_management_type" + }, + "use_option_b": { + "attr_type": "use_option_b" + }, + "layer2_configuration": { + "attr_type": "layer2_configuration" + }, + "option_b_layer3_configuration": { + "attr_type": "option_b_layer3_configuration" + }, + "npb_static_route_configuration": { + "attr_type": "npb_static_route_configuration" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkToNetworkInterconnectPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "layer2_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_layer3_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "npb_static_route_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "import_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_policy": { + "default": "none", + "param_type": "keyword_only" + }, + "egress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "layer2_configuration": { + "attr_type": "layer2_configuration" + }, + "option_b_layer3_configuration": { + "attr_type": "option_b_layer3_configuration" + }, + "npb_static_route_configuration": { + "attr_type": "npb_static_route_configuration" + }, + "import_route_policy": { + "attr_type": "import_route_policy" + }, + "export_route_policy": { + "attr_type": "export_route_policy" + }, + "egress_acl_id": { + "attr_type": "egress_acl_id" + }, + "ingress_acl_id": { + "attr_type": "ingress_acl_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "peer_asn": { + "attr_type": "peer_asn" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "fabric_asn": { + "attr_type": null + }, + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkToNetworkInterconnectsList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NfcSku": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "HIGH_PERFORMANCE": "HIGH_PERFORMANCE", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NniType": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "NPB": "NPB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NpbStaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ipv4_routes": { + "attr_type": "ipv4_routes" + }, + "ipv6_routes": { + "attr_type": "ipv6_routes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "is_data_action": { + "attr_type": null + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": null + }, + "action_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": null + }, + "resource": { + "attr_type": null + }, + "operation": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OptionBLayer3Configuration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "peer_asn": { + "attr_type": "peer_asn" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "fabric_asn": { + "attr_type": null + }, + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OptionBProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "export_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "import_route_targets": { + "attr_type": "import_route_targets" + }, + "export_route_targets": { + "attr_type": "export_route_targets" + }, + "route_targets": { + "attr_type": "route_targets" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM": "SYSTEM", + "USER": "USER", + "USER_SYSTEM": "USER_SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PeeringOption": { + "type": "Enum", + "methods": {}, + "properties": { + "OPTION_A": "OPTION_A", + "OPTION_B": "OPTION_B", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PollingIntervalInSeconds": { + "type": "Enum", + "methods": {}, + "properties": { + "NINETY": "NINETY", + "ONE_HUNDRED_TWENTY": "ONE_HUNDRED_TWENTY", + "SIXTY": "SIXTY", + "THIRTY": "THIRTY", + "as_integer_ratio": "as_integer_ratio", + "bit_count": "bit_count", + "bit_length": "bit_length", + "conjugate": "conjugate", + "denominator": "denominator", + "from_bytes": "from_bytes", + "imag": "imag", + "is_integer": "is_integer", + "numerator": "numerator", + "real": "real", + "to_bytes": "to_bytes" + } + }, + "PollingType": { + "type": "Enum", + "methods": {}, + "properties": { + "PULL": "PULL", + "PUSH": "PUSH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "layer4_protocol": { + "default": null, + "param_type": "keyword_only" + }, + "port_type": { + "default": "none", + "param_type": "keyword_only" + }, + "ports": { + "default": "none", + "param_type": "keyword_only" + }, + "port_group_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "port_type": { + "attr_type": "port_type" + }, + "layer4_protocol": { + "attr_type": "layer4_protocol" + }, + "ports": { + "attr_type": "ports" + }, + "port_group_names": { + "attr_type": "port_group_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "ports": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "ports": { + "attr_type": "ports" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PortType": { + "type": "Enum", + "methods": {}, + "properties": { + "DESTINATION_PORT": "DESTINATION_PORT", + "SOURCE_PORT": "SOURCE_PORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrefixType": { + "type": "Enum", + "methods": {}, + "properties": { + "LONGEST_PREFIX": "LONGEST_PREFIX", + "PREFIX": "PREFIX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPTED": "ACCEPTED", + "CANCELED": "CANCELED", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RebootProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "reboot_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "reboot_type": { + "attr_type": "reboot_type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RebootType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRACEFUL_REBOOT_WITHOUT_ZTP": "GRACEFUL_REBOOT_WITHOUT_ZTP", + "GRACEFUL_REBOOT_WITH_ZTP": "GRACEFUL_REBOOT_WITH_ZTP", + "UNGRACEFUL_REBOOT_WITHOUT_ZTP": "UNGRACEFUL_REBOOT_WITHOUT_ZTP", + "UNGRACEFUL_REBOOT_WITH_ZTP": "UNGRACEFUL_REBOOT_WITH_ZTP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RedistributeConnectedSubnets": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RedistributeStaticRoutes": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePoliciesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "statements": { + "default": "none", + "param_type": "keyword_only" + }, + "address_family_type": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "annotation": { + "attr_type": "annotation" + }, + "default_action": { + "attr_type": "default_action" + }, + "statements": { + "attr_type": "statements" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "address_family_type": { + "attr_type": "address_family_type" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePolicyActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTINUE": "CONTINUE", + "DENY": "DENY", + "PERMIT": "PERMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutePolicyConditionType": { + "type": "Enum", + "methods": {}, + "properties": { + "AND": "AND", + "OR": "OR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "statements": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "default_action": { + "attr_type": "default_action" + }, + "statements": { + "attr_type": "statements" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePolicyPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "statements": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "default_action": { + "attr_type": "default_action" + }, + "statements": { + "attr_type": "statements" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "default": "none", + "param_type": "keyword_only" + }, + "statements": { + "default": "none", + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "address_family_type": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "default_action": { + "attr_type": "default_action" + }, + "statements": { + "attr_type": "statements" + }, + "network_fabric_id": { + "attr_type": "network_fabric_id" + }, + "address_family_type": { + "attr_type": "address_family_type" + }, + "configuration_state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "administrative_state": { + "attr_type": null + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutePolicyStatementProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sequence_number": { + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sequence_number": { + "attr_type": "sequence_number" + }, + "condition": { + "attr_type": "condition" + }, + "action": { + "attr_type": "action" + }, + "annotation": { + "attr_type": "annotation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteTargetInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "import_ipv6_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "export_ipv4_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "export_ipv6_route_targets": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_targets": { + "attr_type": "import_ipv4_route_targets" + }, + "import_ipv6_route_targets": { + "attr_type": "import_ipv6_route_targets" + }, + "export_ipv4_route_targets": { + "attr_type": "export_ipv4_route_targets" + }, + "export_ipv6_route_targets": { + "attr_type": "export_ipv6_route_targets" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "address_list": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "action": { + "attr_type": "action" + }, + "address_list": { + "attr_type": "address_list" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SourceDestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "DESTINATION_IP": "DESTINATION_IP", + "SOURCE_IP": "SOURCE_IP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "StatementActionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "action_type": { + "default": null, + "param_type": "keyword_only" + }, + "local_preference": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_community_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_extended_community_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "local_preference": { + "attr_type": "local_preference" + }, + "action_type": { + "attr_type": "action_type" + }, + "ip_community_properties": { + "attr_type": "ip_community_properties" + }, + "ip_extended_community_properties": { + "attr_type": "ip_extended_community_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "StatementConditionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_community_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "str", + "param_type": "keyword_only" + }, + "ip_prefix_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_ids": { + "attr_type": "ip_extended_community_ids" + }, + "type": { + "attr_type": "type" + }, + "ip_prefix_id": { + "attr_type": "ip_prefix_id" + }, + "ip_community_ids": { + "attr_type": "ip_community_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "StaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv4_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "ipv6_routes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "ipv4_routes": { + "attr_type": "ipv4_routes" + }, + "ipv6_routes": { + "attr_type": "ipv6_routes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "StaticRouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "default": null, + "param_type": "keyword_only" + }, + "next_hop": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "prefix": { + "attr_type": "prefix" + }, + "next_hop": { + "attr_type": "next_hop" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SupportedConnectorProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connector_type": { + "default": "none", + "param_type": "keyword_only" + }, + "max_speed_in_mbps": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "connector_type": { + "attr_type": "connector_type" + }, + "max_speed_in_mbps": { + "attr_type": "max_speed_in_mbps" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SupportedVersionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "default": "none", + "param_type": "keyword_only" + }, + "vendor_os_version": { + "default": "none", + "param_type": "keyword_only" + }, + "vendor_firmware_version": { + "default": "none", + "param_type": "keyword_only" + }, + "is_default": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "version": { + "attr_type": "version" + }, + "vendor_os_version": { + "attr_type": "vendor_os_version" + }, + "vendor_firmware_version": { + "attr_type": "vendor_firmware_version" + }, + "is_default": { + "attr_type": "is_default" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagsUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TapRuleActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "DROP": "DROP", + "GOTO": "GOTO", + "LOG": "LOG", + "MIRROR": "MIRROR", + "REDIRECT": "REDIRECT", + "REPLICATE": "REPLICATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TerminalServerConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "username": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "network_device_id": { + "attr_type": null + }, + "username": { + "attr_type": "username" + }, + "password": { + "attr_type": "password" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TerminalServerPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "username": { + "default": "none", + "param_type": "keyword_only" + }, + "password": { + "default": "none", + "param_type": "keyword_only" + }, + "serial_number": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "username": { + "attr_type": "username" + }, + "password": { + "attr_type": "password" + }, + "serial_number": { + "attr_type": "serial_number" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "system_data": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UpdateAdministrativeState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "resource_ids": { + "attr_type": "resource_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UpdateDeviceAdministrativeState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "default": "none", + "param_type": "keyword_only" + }, + "state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "state": { + "attr_type": "state" + }, + "resource_ids": { + "attr_type": "resource_ids" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UpdateVersion": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "version": { + "attr_type": "version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UpgradeNetworkFabricProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "default": "none", + "param_type": "keyword_only" + }, + "action": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "action": { + "attr_type": "action" + }, + "version": { + "attr_type": "version" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateAction": { + "type": "Enum", + "methods": {}, + "properties": { + "CABLING": "CABLING", + "CONFIGURATION": "CONFIGURATION", + "CONNECTIVITY": "CONNECTIVITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ValidateConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_action": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "validate_action": { + "attr_type": "validate_action" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ValidateConfigurationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "url": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "configuration_state": { + "attr_type": null + }, + "url": { + "attr_type": "url" + }, + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VlanGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "vlans": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "vlans": { + "attr_type": "vlans" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VlanMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "vlans": { + "default": "none", + "param_type": "keyword_only" + }, + "inner_vlans": { + "default": "none", + "param_type": "keyword_only" + }, + "vlan_group_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "vlans": { + "attr_type": "vlans" + }, + "inner_vlans": { + "attr_type": "inner_vlans" + }, + "vlan_group_names": { + "attr_type": "vlan_group_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VpnConfigurationPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peering_option": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VpnConfigurationPatchablePropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VpnConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "peering_option": { + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "default": "none", + "param_type": "keyword_only" + }, + "option_b_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "option_a_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": { + "attr_type": "network_to_network_interconnect_id" + }, + "administrative_state": { + "attr_type": null + }, + "peering_option": { + "attr_type": "peering_option" + }, + "option_b_properties": { + "attr_type": "option_b_properties" + }, + "option_a_properties": { + "attr_type": "option_a_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VpnConfigurationPropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "mtu": { + "default": "int", + "param_type": "keyword_only" + }, + "vlan_id": { + "default": "none", + "param_type": "keyword_only" + }, + "peer_asn": { + "default": "none", + "param_type": "keyword_only" + }, + "bfd_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": { + "attr_type": "primary_ipv4_prefix" + }, + "primary_ipv6_prefix": { + "attr_type": "primary_ipv6_prefix" + }, + "secondary_ipv4_prefix": { + "attr_type": "secondary_ipv4_prefix" + }, + "secondary_ipv6_prefix": { + "attr_type": "secondary_ipv6_prefix" + }, + "mtu": { + "attr_type": "mtu" + }, + "vlan_id": { + "attr_type": "vlan_id" + }, + "peer_asn": { + "attr_type": "peer_asn" + }, + "bfd_configuration": { + "attr_type": "bfd_configuration" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "WellKnownCommunities": { + "type": "Enum", + "methods": {}, + "properties": { + "G_SHUT": "G_SHUT", + "INTERNET": "INTERNET", + "LOCAL_AS": "LOCAL_AS", + "NO_ADVERTISE": "NO_ADVERTISE", + "NO_EXPORT": "NO_EXPORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.operations": { + "class_nodes": { + "AccessControlListsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlListPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AccessControlList", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AccessControlList]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AccessControlList]", + "overloads": [] + } + }, + "properties": {} + }, + "ExternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ExternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_bgp_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewayRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternetGatewayRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGatewayRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGatewayRule]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewaysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGateway", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternetGateway", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGateway]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGateway]", + "overloads": [] + } + }, + "properties": {} + }, + "IpCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpExtendedCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpExtendedCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpPrefixesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefix", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefixPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpPrefix", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpPrefix]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpPrefix]", + "overloads": [] + } + }, + "properties": {} + }, + "L2IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "L2IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L2IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L2IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "L3IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "L3IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L3IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L3IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "NeighborGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroupPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NeighborGroup", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NeighborGroup]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NeighborGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDeviceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkDeviceSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDeviceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RebootProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevicePatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateVersion", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricControllersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricController", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricControllerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabricController", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricController]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricController]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabricSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabric", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_deprovision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [] + }, + "begin_get_topology": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "begin_provision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + } + ] + }, + "begin_update_infra_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_workload_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpgradeNetworkFabricProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ValidateConfigurationProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabric", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabric]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabric]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkInterface", + "overloads": [] + }, + "list_by_network_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkPacketBrokersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBroker", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBrokerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkPacketBroker", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkRacksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRack", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "TagsUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkRack", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkRack]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkRack]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkTapRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTapRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTapRule]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTap", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkTap", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTap]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTap]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkToNetworkInterconnectsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnect", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnectPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_update_npb_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkToNetworkInterconnect", + "overloads": [] + }, + "list_by_network_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkToNetworkInterconnect]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutePoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicyPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RoutePolicy", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RoutePolicy]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RoutePolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py index 832e9d60d304..c0fc69bfb931 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -38,6 +40,7 @@ def main(): "aclsUrl": "https://ACL-Storage-URL", "annotation": "annotation", "configurationType": "File", + "defaultAction": "Permit", "dynamicMatchConfigurations": [ { "ipGroups": [ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py index cf5a165b4d47..c924a1a3dddb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py index 74f1d3279f60..be386193f851 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py index 0b065655621a..1c6cc2e863b3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py index 384472ba48f0..4336747192f8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py index 5ed5a59e1e16..288b0e45e5d6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py index 5893604225fa..6e96da97c148 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py index 2cf5918920a3..9b818d93c2cb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -37,6 +39,7 @@ def main(): "aclsUrl": "https://microsoft.com/a", "annotation": "annotation", "configurationType": "File", + "defaultAction": "Permit", "dynamicMatchConfigurations": [ { "ipGroups": [ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py index 493744e96903..5a0391af3c92 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py index 8dff2daf941d..ad82153c46e2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -46,6 +48,7 @@ def main(): "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, "importRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", "optionAProperties": { "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 15}, "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py index 1b7714b6a40c..54cb3f4b87ec 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py index fe72b2502f4a..566effab91a7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py index 946d9a2a7af8..7ea322ff4aa5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py index a530102d1e81..3e866c2c57f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py index 323a0ed8ef09..3e57c447b713 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py index 3c5d7c2401e7..f16e5b908751 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py index 68857714cd4d..aec929b3be5c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py index 22f3b68e8722..c58a470645f4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py index 931ba536dcdd..ed959a6f7dd7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py index 31766e889933..ecba937f926c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py index eeb64ea18e79..4fea4f323f42 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py index f7be99c35d7f..fdc8e3b9b99a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py index 93acdddd72ba..864e2719117b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py index beeb4beaa38e..4af851355f00 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py index c26a25ebfbff..4b63477d2355 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py index 610b4184988d..b214f58a5176 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py index 53b8625a7420..cb9a4bbcf638 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py index e4e3eb8650c4..52f38edfbe1f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py index 799140dadb97..df530aee3817 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py index 6ea5250d8893..66a276e7919c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py index 38e970cfe396..e02e6c57dff7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py index ccc3048fd240..03861932b591 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py index e9c3f35ffc84..15a1a66eaaa0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py index 3a15a611d808..c28fd7e79b32 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py index 17d2cd72ae95..2046b5998b76 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py index 4151a2aedc27..83960258e95c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py index 28e52eaebd3d..ea118dd7b093 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py index ec57e254809b..1f6eb78c2e35 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py index 7d700e18bd7a..3c372026ce43 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py index 2988a4a4d54a..950a9ffef423 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py index dbcbd1149e47..c8ee03ce308b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py index 42fe84dd9f8e..8fc5735c69fe 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py index 92ec9068fa5f..01af64fa7f9b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py index 685b77d6e880..7a215007aeb8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py index d046f9ea3b98..8c30caac454d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py index 96276c75a0fc..1b6073927db8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py index aae28a26673e..5ee5d28ff1ee 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py index 89d9b468563b..88ad47fcb9a4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py index 68ab865ab174..90aaa33d5ba5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py index 62a26fe050eb..3d739ffe2c61 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py index c202ba4e87f2..6c9fcab5b202 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py index 0cbc44821875..ca55452abb3f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py index 1db2ae442cad..d9f896941919 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py index 67cc1e5bf704..e8d767a418ef 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py index f07d11656e42..2eb799e0b19a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py index c84e607a840a..45cc837d8ed2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py index 04fab827be0e..e02e3a3b78c8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py index 08b0fc0e589b..1f952023812c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py index 9cbc36c23250..c3e155a844ad 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py index 1bb046dff0e8..945367b4ce2e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py index 3a7600465d48..fcc3a4d8abf1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py index 8557dfb2215b..d96763838208 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py index c37e4caa4e46..037baee18ad0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py index 5f3729f4221d..fa5204745dbf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py index dff6a50b669c..11ac71111363 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py index e649b4843bac..974841b3cd09 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py index db1bc6a794c6..acc68603b9d9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py index 25b60cb48395..b0aa35260d20 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py index 4639b4799f23..9e3ddc8abb5f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py index e4d4b354c857..b0777cea388b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py index a7b4c7c33431..0ce4d047facd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py index 4fe939c34628..84f4f149b3ec 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py index 4a4eb9120ae2..4a6f03e9632e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py index d843f250d42a..2c10fa4a763a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py index 6745b44a7e0a..56ff0c9819f3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py index 5dcda092d40c..327a082c47e9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py index 729789a1c1e8..93d2d1a8e518 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py index 912b92ed7e6f..8e93c18ad74e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py index 545f33d91d6c..9a20433c54f4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py index 9f7b76ead378..9760bd0aeb86 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py index 5c33c1499ae5..ec30811cb1c5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py index 5eb0f30d4302..789904c2d748 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py index 133ccc5f264b..639b68aa2b31 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py index 8718a782d0ab..2d900597a210 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py index 467f2b86bbd6..9c70efbfb5fb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py index 06c6f3fd1855..3a52be9ccc8e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py index a07f44bb125d..63f6022d95fd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py index f173a321db9b..aceaab319706 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py index 19f939dd29c0..da71ff5c64cf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py index bb3c986196d4..14945b24931f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py index ccc7914b2336..d7b9c45f55cf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py index 8c0d6d9a7438..8b8466077b3b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py index 96f4566a6837..848564e7bf13 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py index 1a0d1e8fb1bb..1dbed3d003b7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py index 8e51268bd24f..bd4f212e5618 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py index 6a6bd1025e3b..2aca46308f34 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py index 0ea51dd27850..b9198f960298 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py index df69d855e24f..1a9d648dbaf1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py index f11f6a1e586a..6dceb2df53ce 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py index c0a1871b565f..0c5b4837ff3e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py index 1c38e1e37dfa..520d6dc7bbf6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -37,6 +39,7 @@ def main(): "properties": { "annotation": "annotation", "fabricASN": 29249, + "fabricVersion": "1.x.x", "ipv4Prefix": "10.18.0.0/19", "ipv6Prefix": "3FFE:FFFF:0:CD40::/59", "managementNetworkConfiguration": { diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py index aec3e447ddc3..3f1d0ee8ceb8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py index 1ff66325bca9..b24c01818b3b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py index 053bfcd649e2..80a3f4a11249 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py index 2f65fa77f17e..2e13136f87c0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py index 40d43893524d..11a9192d4b23 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py index 496eddd2f152..90f82fd7f50e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py index 680a8c9ceeb1..3855130e5b25 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py index 53634263d08f..a49de828e3e6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py index 58e9cd6c407a..f5f1e73586fd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py index e980b716249d..0d90a73a3368 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py index 5e4dc296c7ff..c5d3c84e8879 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py index ca1b5f37ef4a..35fa66f254c3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -32,7 +34,7 @@ def main(): response = client.network_fabrics.begin_upgrade( resource_group_name="example-rg", network_fabric_name="example-fabric", - body={"version": "version1"}, + body={"action": "Start", "version": "3.x.x"}, ).result() print(response) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py index 4e2f61a6190e..270e35170519 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py index 4424954c9d2e..b607003b9a56 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py index 855e9f59a8ba..1661916bdfae 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py index cef1d4c687b5..10e4738288df 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py index bd77197c2c4d..944b14b1fb44 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py index f845a30ac9a5..83044d7165e0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py index ac5566ebf4cd..1cbae0efae6a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py index 5fd1f5fae6f4..11bc3c05c33c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py index 6c54d0bf2190..eeded96ff885 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py index de37bd56763b..5124c727a79a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py index c10c1ee817fa..49af3910327e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py index bf7d372801d6..6c3ab9682aab 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py index e1b584e32d8d..796771ea41b1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py index aad6e0ca4a4a..28bbf3f468c0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py index d2afe6232339..22cb81c39633 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py index a6e4dae1964d..18a1bb23982f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py index 3e76a2f75242..c3bd1d865251 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py index 84c5f5e9c711..72a8d731ad47 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py index a07d0ac91e00..d079208429f3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py index 1a01c738274a..a381f4776d22 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py index 6aef1728047d..e7a01bede0eb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py index 87f58a4fd322..25dc88f61dc3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py index 75598d5b31d8..7b509cf95378 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py index c6acb7d4899f..bbc5bb7759ef 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py index d4270a396144..27b115236f48 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py index f75c088089fe..f3007d085567 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py index 1e2515ed6b96..74f9eea63c0d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py index c1e89ed1784e..f8f5abf24eb6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py index 47ac85c9377d..327095836953 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py index 5263735845bc..084702764e17 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py index 9c89fa006879..dae1d81d60e1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py index 1146dbf0e123..636201f639e4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py index 59787bd05855..a9c7455ba9b1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py index d134909e14fb..503585b5fa70 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py index b2d58892f038..9c1cfea5e0ac 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py index 06fc9bdeed57..d29b9f670fdd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py index 045bb36b4d51..b9c6d8479f72 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py index 6b243dc9e231..fd3134dd7ee7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py index 0e3f6a737b8a..0a0c65915a3d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py index 1120b04fd593..d512bd10b97e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py index 1834d0385c60..2a01e39e58b3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py index f9ca0e814a1e..e528569df1e6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py index af48e496156d..4dc544c9e3ab 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py index 132d2fb76ca2..228736c37a80 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py index dec316882edf..20bae1359bd9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -37,6 +39,7 @@ def main(): "properties": { "addressFamilyType": "IPv4", "annotation": "annotation", + "defaultAction": "Deny", "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", "statements": [ { diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py index e3b4ba7b75fa..ed53eec66be7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py index 122f18c46451..c5ae5adc4263 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py index f27a37bdd1e4..d9d99f85e4ef 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py index 1a2225a26e6d..8dfde22405be 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py index 8b58cde0f1d4..c1b702da582d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py index 628956f07c86..56cbdcd9dee1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ @@ -34,6 +36,7 @@ def main(): route_policy_name="example-routePolicy", body={ "properties": { + "defaultAction": "Deny", "statements": [ { "action": { @@ -87,7 +90,7 @@ def main(): }, "sequenceNumber": 7, } - ] + ], }, "tags": {"keyID": "keyValue"}, }, diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py index 2b4e95c2830a..fc21ccee4cb8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +8,7 @@ # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential + from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient """ diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py new file mode 100644 index 000000000000..4addcddded8d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py @@ -0,0 +1,43 @@ +# 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. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + managednetworkfabricmgmt_subscription_id = os.environ.get( + "AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" + ) + managednetworkfabricmgmt_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + managednetworkfabricmgmt_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + managednetworkfabricmgmt_client_secret = os.environ.get( + "AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" + ) + add_general_regex_sanitizer( + regex=managednetworkfabricmgmt_subscription_id, value="00000000-0000-0000-0000-000000000000" + ) + add_general_regex_sanitizer(regex=managednetworkfabricmgmt_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=managednetworkfabricmgmt_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer( + regex=managednetworkfabricmgmt_client_secret, value="00000000-0000-0000-0000-000000000000" + ) + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py new file mode 100644 index 000000000000..7daa3d5bf9fc --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py @@ -0,0 +1,241 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtAccessControlListsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_create(self, resource_group): + response = self.client.access_control_lists.begin_create( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={ + "location": "str", + "aclsUrl": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "configurationType": "str", + "defaultAction": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "id": "str", + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [{"counterName": "str", "type": "str"}], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_get(self, resource_group): + response = self.client.access_control_lists.get( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_update(self, resource_group): + response = self.client.access_control_lists.begin_update( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={ + "aclsUrl": "str", + "annotation": "str", + "configurationType": "str", + "defaultAction": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "matchConfigurations": [ + { + "actions": [{"counterName": "str", "type": "str"}], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_delete(self, resource_group): + response = self.client.access_control_lists.begin_delete( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_list_by_resource_group(self, resource_group): + response = self.client.access_control_lists.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_list_by_subscription(self, resource_group): + response = self.client.access_control_lists.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_update_administrative_state(self, resource_group): + response = self.client.access_control_lists.begin_update_administrative_state( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_resync(self, resource_group): + response = self.client.access_control_lists.begin_resync( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_begin_validate_configuration(self, resource_group): + response = self.client.access_control_lists.begin_validate_configuration( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py new file mode 100644 index 000000000000..9ff115567d61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py @@ -0,0 +1,254 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtAccessControlListsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_create(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_create( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={ + "location": "str", + "aclsUrl": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "configurationType": "str", + "defaultAction": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "id": "str", + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [{"counterName": "str", "type": "str"}], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_get(self, resource_group): + response = await self.client.access_control_lists.get( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_update(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_update( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={ + "aclsUrl": "str", + "annotation": "str", + "configurationType": "str", + "defaultAction": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "matchConfigurations": [ + { + "actions": [{"counterName": "str", "type": "str"}], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_delete(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_delete( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_list_by_resource_group(self, resource_group): + response = self.client.access_control_lists.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_list_by_subscription(self, resource_group): + response = self.client.access_control_lists.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_update_administrative_state( + resource_group_name=resource_group.name, + access_control_list_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_resync(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_resync( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.access_control_lists.begin_validate_configuration( + resource_group_name=resource_group.name, + access_control_list_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py new file mode 100644 index 000000000000..91f6a4d5a754 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py @@ -0,0 +1,197 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtExternalNetworksOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_create(self, resource_group): + response = self.client.external_networks.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={ + "peeringOption": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "name": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_get(self, resource_group): + response = self.client.external_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_update(self, resource_group): + response = self.client.external_networks.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={ + "annotation": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_delete(self, resource_group): + response = self.client.external_networks.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_list_by_l3_isolation_domain(self, resource_group): + response = self.client.external_networks.list_by_l3_isolation_domain( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_update_administrative_state(self, resource_group): + response = self.client.external_networks.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_update_static_route_bfd_administrative_state(self, resource_group): + response = self.client.external_networks.begin_update_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py new file mode 100644 index 000000000000..0a52c756d64c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py @@ -0,0 +1,208 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtExternalNetworksOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_create(self, resource_group): + response = await ( + await self.client.external_networks.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={ + "peeringOption": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "name": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_get(self, resource_group): + response = await self.client.external_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_update(self, resource_group): + response = await ( + await self.client.external_networks.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={ + "annotation": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_delete(self, resource_group): + response = await ( + await self.client.external_networks.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_list_by_l3_isolation_domain(self, resource_group): + response = self.client.external_networks.list_by_l3_isolation_domain( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.external_networks.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_update_static_route_bfd_administrative_state(self, resource_group): + response = await ( + await self.client.external_networks.begin_update_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py new file mode 100644 index 000000000000..250bf4627644 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py @@ -0,0 +1,220 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternalNetworksOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_create(self, resource_group): + response = self.client.internal_networks.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={ + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "bgpConfiguration": { + "allowAS": 2, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], + "peerASN": 0, + }, + "configurationState": "str", + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "extension": "NoExtension", + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "ingressAclId": "str", + "isMonitoringEnabled": "False", + "mtu": 1500, + "name": "str", + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "extension": "NoExtension", + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_get(self, resource_group): + response = self.client.internal_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_update(self, resource_group): + response = self.client.internal_networks.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={ + "annotation": "str", + "bgpConfiguration": { + "allowAS": 2, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], + "peerASN": 0, + }, + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "ingressAclId": "str", + "isMonitoringEnabled": "False", + "mtu": 1500, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_delete(self, resource_group): + response = self.client.internal_networks.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_list_by_l3_isolation_domain(self, resource_group): + response = self.client.internal_networks.list_by_l3_isolation_domain( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_update_administrative_state(self, resource_group): + response = self.client.internal_networks.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_update_bgp_administrative_state(self, resource_group): + response = self.client.internal_networks.begin_update_bgp_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_update_static_route_bfd_administrative_state(self, resource_group): + response = self.client.internal_networks.begin_update_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py new file mode 100644 index 000000000000..1fd71ef0257e --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py @@ -0,0 +1,233 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternalNetworksOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_create(self, resource_group): + response = await ( + await self.client.internal_networks.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={ + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "bgpConfiguration": { + "allowAS": 2, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], + "peerASN": 0, + }, + "configurationState": "str", + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "extension": "NoExtension", + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "ingressAclId": "str", + "isMonitoringEnabled": "False", + "mtu": 1500, + "name": "str", + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "extension": "NoExtension", + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_get(self, resource_group): + response = await self.client.internal_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_update(self, resource_group): + response = await ( + await self.client.internal_networks.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={ + "annotation": "str", + "bgpConfiguration": { + "allowAS": 2, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], + "peerASN": 0, + }, + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "importRoutePolicyId": "str", + "ingressAclId": "str", + "isMonitoringEnabled": "False", + "mtu": 1500, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_delete(self, resource_group): + response = await ( + await self.client.internal_networks.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_list_by_l3_isolation_domain(self, resource_group): + response = self.client.internal_networks.list_by_l3_isolation_domain( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.internal_networks.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_update_bgp_administrative_state(self, resource_group): + response = await ( + await self.client.internal_networks.begin_update_bgp_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_update_static_route_bfd_administrative_state(self, resource_group): + response = await ( + await self.client.internal_networks.begin_update_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py new file mode 100644 index 000000000000..a0716b013f22 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py @@ -0,0 +1,108 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternetGatewayRulesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_begin_create(self, resource_group): + response = self.client.internet_gateway_rules.begin_create( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + body={ + "location": "str", + "ruleProperties": {"action": "str", "addressList": ["str"]}, + "annotation": "str", + "id": "str", + "internetGatewayIds": ["str"], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_get(self, resource_group): + response = self.client.internet_gateway_rules.get( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_begin_update(self, resource_group): + response = self.client.internet_gateway_rules.begin_update( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_begin_delete(self, resource_group): + response = self.client.internet_gateway_rules.begin_delete( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_list_by_resource_group(self, resource_group): + response = self.client.internet_gateway_rules.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_list_by_subscription(self, resource_group): + response = self.client.internet_gateway_rules.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py new file mode 100644 index 000000000000..86cb0a0978a7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py @@ -0,0 +1,115 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternetGatewayRulesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_begin_create(self, resource_group): + response = await ( + await self.client.internet_gateway_rules.begin_create( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + body={ + "location": "str", + "ruleProperties": {"action": "str", "addressList": ["str"]}, + "annotation": "str", + "id": "str", + "internetGatewayIds": ["str"], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_get(self, resource_group): + response = await self.client.internet_gateway_rules.get( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_begin_update(self, resource_group): + response = await ( + await self.client.internet_gateway_rules.begin_update( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_begin_delete(self, resource_group): + response = await ( + await self.client.internet_gateway_rules.begin_delete( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_list_by_resource_group(self, resource_group): + response = self.client.internet_gateway_rules.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_list_by_subscription(self, resource_group): + response = self.client.internet_gateway_rules.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py new file mode 100644 index 000000000000..8ae9fa88a6d5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py @@ -0,0 +1,110 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternetGatewaysOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_begin_create(self, resource_group): + response = self.client.internet_gateways.begin_create( + resource_group_name=resource_group.name, + internet_gateway_name="str", + body={ + "location": "str", + "networkFabricControllerId": "str", + "annotation": "str", + "id": "str", + "internetGatewayRuleId": "str", + "ipv4Address": "str", + "name": "str", + "port": 0, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_get(self, resource_group): + response = self.client.internet_gateways.get( + resource_group_name=resource_group.name, + internet_gateway_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_begin_update(self, resource_group): + response = self.client.internet_gateways.begin_update( + resource_group_name=resource_group.name, + internet_gateway_name="str", + body={"internetGatewayRuleId": "str", "tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_begin_delete(self, resource_group): + response = self.client.internet_gateways.begin_delete( + resource_group_name=resource_group.name, + internet_gateway_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_list_by_resource_group(self, resource_group): + response = self.client.internet_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_list_by_subscription(self, resource_group): + response = self.client.internet_gateways.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py new file mode 100644 index 000000000000..fca436d6294c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py @@ -0,0 +1,117 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtInternetGatewaysOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_begin_create(self, resource_group): + response = await ( + await self.client.internet_gateways.begin_create( + resource_group_name=resource_group.name, + internet_gateway_name="str", + body={ + "location": "str", + "networkFabricControllerId": "str", + "annotation": "str", + "id": "str", + "internetGatewayRuleId": "str", + "ipv4Address": "str", + "name": "str", + "port": 0, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_get(self, resource_group): + response = await self.client.internet_gateways.get( + resource_group_name=resource_group.name, + internet_gateway_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_begin_update(self, resource_group): + response = await ( + await self.client.internet_gateways.begin_update( + resource_group_name=resource_group.name, + internet_gateway_name="str", + body={"internetGatewayRuleId": "str", "tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_begin_delete(self, resource_group): + response = await ( + await self.client.internet_gateways.begin_delete( + resource_group_name=resource_group.name, + internet_gateway_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_list_by_resource_group(self, resource_group): + response = self.client.internet_gateways.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_list_by_subscription(self, resource_group): + response = self.client.internet_gateways.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py new file mode 100644 index 000000000000..3de2d43d79d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py @@ -0,0 +1,116 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpCommunitiesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_begin_create(self, resource_group): + response = self.client.ip_communities.begin_create( + resource_group_name=resource_group.name, + ip_community_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "ipCommunityRules": [ + {"action": "str", "communityMembers": ["str"], "sequenceNumber": 0, "wellKnownCommunities": ["str"]} + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_get(self, resource_group): + response = self.client.ip_communities.get( + resource_group_name=resource_group.name, + ip_community_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_begin_update(self, resource_group): + response = self.client.ip_communities.begin_update( + resource_group_name=resource_group.name, + ip_community_name="str", + body={ + "ipCommunityRules": [ + {"action": "str", "communityMembers": ["str"], "sequenceNumber": 0, "wellKnownCommunities": ["str"]} + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_begin_delete(self, resource_group): + response = self.client.ip_communities.begin_delete( + resource_group_name=resource_group.name, + ip_community_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_list_by_resource_group(self, resource_group): + response = self.client.ip_communities.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_list_by_subscription(self, resource_group): + response = self.client.ip_communities.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py new file mode 100644 index 000000000000..ad577d6362ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py @@ -0,0 +1,133 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpCommunitiesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_begin_create(self, resource_group): + response = await ( + await self.client.ip_communities.begin_create( + resource_group_name=resource_group.name, + ip_community_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_get(self, resource_group): + response = await self.client.ip_communities.get( + resource_group_name=resource_group.name, + ip_community_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_begin_update(self, resource_group): + response = await ( + await self.client.ip_communities.begin_update( + resource_group_name=resource_group.name, + ip_community_name="str", + body={ + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_begin_delete(self, resource_group): + response = await ( + await self.client.ip_communities.begin_delete( + resource_group_name=resource_group.name, + ip_community_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_list_by_resource_group(self, resource_group): + response = self.client.ip_communities.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_list_by_subscription(self, resource_group): + response = self.client.ip_communities.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py new file mode 100644 index 000000000000..27a989b31aaf --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py @@ -0,0 +1,113 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpExtendedCommunitiesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_begin_create(self, resource_group): + response = self.client.ip_extended_communities.begin_create( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + body={ + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_get(self, resource_group): + response = self.client.ip_extended_communities.get( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_begin_update(self, resource_group): + response = self.client.ip_extended_communities.begin_update( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + body={ + "annotation": "str", + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_begin_delete(self, resource_group): + response = self.client.ip_extended_communities.begin_delete( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_list_by_resource_group(self, resource_group): + response = self.client.ip_extended_communities.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_list_by_subscription(self, resource_group): + response = self.client.ip_extended_communities.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py new file mode 100644 index 000000000000..93255b6f7c4e --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py @@ -0,0 +1,120 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpExtendedCommunitiesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_begin_create(self, resource_group): + response = await ( + await self.client.ip_extended_communities.begin_create( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + body={ + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_get(self, resource_group): + response = await self.client.ip_extended_communities.get( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_begin_update(self, resource_group): + response = await ( + await self.client.ip_extended_communities.begin_update( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + body={ + "annotation": "str", + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_begin_delete(self, resource_group): + response = await ( + await self.client.ip_extended_communities.begin_delete( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_list_by_resource_group(self, resource_group): + response = self.client.ip_extended_communities.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_list_by_subscription(self, resource_group): + response = self.client.ip_extended_communities.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py new file mode 100644 index 000000000000..1b58da0bb454 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py @@ -0,0 +1,129 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpPrefixesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_begin_create(self, resource_group): + response = self.client.ip_prefixes.begin_create( + resource_group_name=resource_group.name, + ip_prefix_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_get(self, resource_group): + response = self.client.ip_prefixes.get( + resource_group_name=resource_group.name, + ip_prefix_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_begin_update(self, resource_group): + response = self.client.ip_prefixes.begin_update( + resource_group_name=resource_group.name, + ip_prefix_name="str", + body={ + "annotation": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_begin_delete(self, resource_group): + response = self.client.ip_prefixes.begin_delete( + resource_group_name=resource_group.name, + ip_prefix_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_list_by_resource_group(self, resource_group): + response = self.client.ip_prefixes.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_list_by_subscription(self, resource_group): + response = self.client.ip_prefixes.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py new file mode 100644 index 000000000000..1483067ffdd0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py @@ -0,0 +1,136 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtIpPrefixesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_begin_create(self, resource_group): + response = await ( + await self.client.ip_prefixes.begin_create( + resource_group_name=resource_group.name, + ip_prefix_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_get(self, resource_group): + response = await self.client.ip_prefixes.get( + resource_group_name=resource_group.name, + ip_prefix_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_begin_update(self, resource_group): + response = await ( + await self.client.ip_prefixes.begin_update( + resource_group_name=resource_group.name, + ip_prefix_name="str", + body={ + "annotation": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_begin_delete(self, resource_group): + response = await ( + await self.client.ip_prefixes.begin_delete( + resource_group_name=resource_group.name, + ip_prefix_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_list_by_resource_group(self, resource_group): + response = self.client.ip_prefixes.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_list_by_subscription(self, resource_group): + response = self.client.ip_prefixes.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py new file mode 100644 index 000000000000..7b3c7f3bf81c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py @@ -0,0 +1,148 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtL2IsolationDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_create(self, resource_group): + response = self.client.l2_isolation_domains.begin_create( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "mtu": 1500, + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_get(self, resource_group): + response = self.client.l2_isolation_domains.get( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_update(self, resource_group): + response = self.client.l2_isolation_domains.begin_update( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={"annotation": "str", "mtu": 1500, "tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_delete(self, resource_group): + response = self.client.l2_isolation_domains.begin_delete( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_update_administrative_state(self, resource_group): + response = self.client.l2_isolation_domains.begin_update_administrative_state( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_validate_configuration(self, resource_group): + response = self.client.l2_isolation_domains.begin_validate_configuration( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_begin_commit_configuration(self, resource_group): + response = self.client.l2_isolation_domains.begin_commit_configuration( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l2_isolation_domains.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l2_isolation_domains.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py new file mode 100644 index 000000000000..60021d1076e9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py @@ -0,0 +1,161 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtL2IsolationDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_create(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_create( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "mtu": 1500, + "name": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_get(self, resource_group): + response = await self.client.l2_isolation_domains.get( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_update(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_update( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={"annotation": "str", "mtu": 1500, "tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_delete(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_delete( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_update_administrative_state( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_validate_configuration( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_begin_commit_configuration(self, resource_group): + response = await ( + await self.client.l2_isolation_domains.begin_commit_configuration( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l2_isolation_domains.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l2_isolation_domains.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py new file mode 100644 index 000000000000..7c7f090f2353 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py @@ -0,0 +1,163 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtL3IsolationDomainsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_create(self, resource_group): + response = self.client.l3_isolation_domains.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "administrativeState": "str", + "aggregateRouteConfiguration": {"ipv4Routes": [{"prefix": "str"}], "ipv6Routes": [{"prefix": "str"}]}, + "annotation": "str", + "configurationState": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + }, + "id": "str", + "name": "str", + "provisioningState": "str", + "redistributeConnectedSubnets": "True", + "redistributeStaticRoutes": "False", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_get(self, resource_group): + response = self.client.l3_isolation_domains.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_update(self, resource_group): + response = self.client.l3_isolation_domains.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={ + "aggregateRouteConfiguration": {"ipv4Routes": [{"prefix": "str"}], "ipv6Routes": [{"prefix": "str"}]}, + "annotation": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + }, + "redistributeConnectedSubnets": "True", + "redistributeStaticRoutes": "False", + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_delete(self, resource_group): + response = self.client.l3_isolation_domains.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l3_isolation_domains.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l3_isolation_domains.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_update_administrative_state(self, resource_group): + response = self.client.l3_isolation_domains.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_validate_configuration(self, resource_group): + response = self.client.l3_isolation_domains.begin_validate_configuration( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_begin_commit_configuration(self, resource_group): + response = self.client.l3_isolation_domains.begin_commit_configuration( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py new file mode 100644 index 000000000000..885757d8634f --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py @@ -0,0 +1,182 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtL3IsolationDomainsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_create(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_create( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "administrativeState": "str", + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "configurationState": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + }, + "id": "str", + "name": "str", + "provisioningState": "str", + "redistributeConnectedSubnets": "True", + "redistributeStaticRoutes": "False", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_get(self, resource_group): + response = await self.client.l3_isolation_domains.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_update(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_update( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={ + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "exportRoutePolicyId": "str", + }, + "redistributeConnectedSubnets": "True", + "redistributeStaticRoutes": "False", + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_delete(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_delete( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l3_isolation_domains.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l3_isolation_domains.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_update_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_validate_configuration( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_begin_commit_configuration(self, resource_group): + response = await ( + await self.client.l3_isolation_domains.begin_commit_configuration( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py new file mode 100644 index 000000000000..5540915b30d0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py @@ -0,0 +1,113 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNeighborGroupsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_begin_create(self, resource_group): + response = self.client.neighbor_groups.begin_create( + resource_group_name=resource_group.name, + neighbor_group_name="str", + body={ + "location": "str", + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "id": "str", + "name": "str", + "networkTapIds": ["str"], + "networkTapRuleIds": ["str"], + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_get(self, resource_group): + response = self.client.neighbor_groups.get( + resource_group_name=resource_group.name, + neighbor_group_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_begin_update(self, resource_group): + response = self.client.neighbor_groups.begin_update( + resource_group_name=resource_group.name, + neighbor_group_name="str", + body={ + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_begin_delete(self, resource_group): + response = self.client.neighbor_groups.begin_delete( + resource_group_name=resource_group.name, + neighbor_group_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_list_by_resource_group(self, resource_group): + response = self.client.neighbor_groups.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_list_by_subscription(self, resource_group): + response = self.client.neighbor_groups.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py new file mode 100644 index 000000000000..4c0c0e85be9d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py @@ -0,0 +1,120 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNeighborGroupsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_begin_create(self, resource_group): + response = await ( + await self.client.neighbor_groups.begin_create( + resource_group_name=resource_group.name, + neighbor_group_name="str", + body={ + "location": "str", + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "id": "str", + "name": "str", + "networkTapIds": ["str"], + "networkTapRuleIds": ["str"], + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_get(self, resource_group): + response = await self.client.neighbor_groups.get( + resource_group_name=resource_group.name, + neighbor_group_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_begin_update(self, resource_group): + response = await ( + await self.client.neighbor_groups.begin_update( + resource_group_name=resource_group.name, + neighbor_group_name="str", + body={ + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_begin_delete(self, resource_group): + response = await ( + await self.client.neighbor_groups.begin_delete( + resource_group_name=resource_group.name, + neighbor_group_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_list_by_resource_group(self, resource_group): + response = self.client.neighbor_groups.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_list_by_subscription(self, resource_group): + response = self.client.neighbor_groups.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py new file mode 100644 index 000000000000..ffd4ef3f7753 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkDeviceSkusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_device_skus_get(self, resource_group): + response = self.client.network_device_skus.get( + network_device_sku_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_device_skus_list_by_subscription(self, resource_group): + response = self.client.network_device_skus.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py new file mode 100644 index 000000000000..1c82dc40978d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py @@ -0,0 +1,41 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkDeviceSkusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_device_skus_get(self, resource_group): + response = await self.client.network_device_skus.get( + network_device_sku_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_device_skus_list_by_subscription(self, resource_group): + response = self.client.network_device_skus.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py new file mode 100644 index 000000000000..cc45f2ea6aef --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py @@ -0,0 +1,167 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkDevicesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_create(self, resource_group): + response = self.client.network_devices.begin_create( + resource_group_name=resource_group.name, + network_device_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "hostName": "str", + "id": "str", + "managementIpv4Address": "str", + "managementIpv6Address": "str", + "name": "str", + "networkDeviceRole": "str", + "networkDeviceSku": "str", + "networkRackId": "str", + "provisioningState": "str", + "serialNumber": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "version": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_get(self, resource_group): + response = self.client.network_devices.get( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_update(self, resource_group): + response = self.client.network_devices.begin_update( + resource_group_name=resource_group.name, + network_device_name="str", + body={"annotation": "str", "hostName": "str", "serialNumber": "str", "tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_delete(self, resource_group): + response = self.client.network_devices.begin_delete( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_list_by_resource_group(self, resource_group): + response = self.client.network_devices.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_list_by_subscription(self, resource_group): + response = self.client.network_devices.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_reboot(self, resource_group): + response = self.client.network_devices.begin_reboot( + resource_group_name=resource_group.name, + network_device_name="str", + body={"rebootType": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_refresh_configuration(self, resource_group): + response = self.client.network_devices.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_update_administrative_state(self, resource_group): + response = self.client.network_devices.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_device_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_upgrade(self, resource_group): + response = self.client.network_devices.begin_upgrade( + resource_group_name=resource_group.name, + network_device_name="str", + body={"version": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py new file mode 100644 index 000000000000..08f7e8dd5ca5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py @@ -0,0 +1,182 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkDevicesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_create(self, resource_group): + response = await ( + await self.client.network_devices.begin_create( + resource_group_name=resource_group.name, + network_device_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "hostName": "str", + "id": "str", + "managementIpv4Address": "str", + "managementIpv6Address": "str", + "name": "str", + "networkDeviceRole": "str", + "networkDeviceSku": "str", + "networkRackId": "str", + "provisioningState": "str", + "serialNumber": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + "version": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_get(self, resource_group): + response = await self.client.network_devices.get( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_update(self, resource_group): + response = await ( + await self.client.network_devices.begin_update( + resource_group_name=resource_group.name, + network_device_name="str", + body={"annotation": "str", "hostName": "str", "serialNumber": "str", "tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_delete(self, resource_group): + response = await ( + await self.client.network_devices.begin_delete( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_list_by_resource_group(self, resource_group): + response = self.client.network_devices.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_list_by_subscription(self, resource_group): + response = self.client.network_devices.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_reboot(self, resource_group): + response = await ( + await self.client.network_devices.begin_reboot( + resource_group_name=resource_group.name, + network_device_name="str", + body={"rebootType": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_refresh_configuration(self, resource_group): + response = await ( + await self.client.network_devices.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_devices.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_device_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_upgrade(self, resource_group): + response = await ( + await self.client.network_devices.begin_upgrade( + resource_group_name=resource_group.name, + network_device_name="str", + body={"version": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py new file mode 100644 index 000000000000..e98eff56aecf --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py @@ -0,0 +1,130 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricControllersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_begin_create(self, resource_group): + response = self.client.network_fabric_controllers.begin_create( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + body={ + "location": "str", + "annotation": "str", + "id": "str", + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + "ipv4AddressSpace": "10.0.0.0/19", + "ipv6AddressSpace": "FC00::/59", + "isWorkloadManagementNetworkEnabled": "True", + "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "name": "str", + "networkFabricIds": ["str"], + "nfcSku": "Standard", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "tenantInternetGatewayIds": ["str"], + "type": "str", + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadManagementNetwork": True, + "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_get(self, resource_group): + response = self.client.network_fabric_controllers.get( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_begin_update(self, resource_group): + response = self.client.network_fabric_controllers.begin_update( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + body={ + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "tags": {"str": "str"}, + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_begin_delete(self, resource_group): + response = self.client.network_fabric_controllers.begin_delete( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_list_by_resource_group(self, resource_group): + response = self.client.network_fabric_controllers.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_list_by_subscription(self, resource_group): + response = self.client.network_fabric_controllers.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py new file mode 100644 index 000000000000..92df5b564d6c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py @@ -0,0 +1,137 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricControllersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_begin_create(self, resource_group): + response = await ( + await self.client.network_fabric_controllers.begin_create( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + body={ + "location": "str", + "annotation": "str", + "id": "str", + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + "ipv4AddressSpace": "10.0.0.0/19", + "ipv6AddressSpace": "FC00::/59", + "isWorkloadManagementNetworkEnabled": "True", + "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "name": "str", + "networkFabricIds": ["str"], + "nfcSku": "Standard", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "tenantInternetGatewayIds": ["str"], + "type": "str", + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadManagementNetwork": True, + "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_get(self, resource_group): + response = await self.client.network_fabric_controllers.get( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_begin_update(self, resource_group): + response = await ( + await self.client.network_fabric_controllers.begin_update( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + body={ + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "tags": {"str": "str"}, + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_begin_delete(self, resource_group): + response = await ( + await self.client.network_fabric_controllers.begin_delete( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_list_by_resource_group(self, resource_group): + response = self.client.network_fabric_controllers.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_list_by_subscription(self, resource_group): + response = self.client.network_fabric_controllers.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py new file mode 100644 index 000000000000..5f2485c1533f --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricSkusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_skus_get(self, resource_group): + response = self.client.network_fabric_skus.get( + network_fabric_sku_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_skus_list_by_subscription(self, resource_group): + response = self.client.network_fabric_skus.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py new file mode 100644 index 000000000000..081baab6e729 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py @@ -0,0 +1,41 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricSkusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_skus_get(self, resource_group): + response = await self.client.network_fabric_skus.get( + network_fabric_sku_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_skus_list_by_subscription(self, resource_group): + response = self.client.network_fabric_skus.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py new file mode 100644 index 000000000000..a3701c0e0216 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py @@ -0,0 +1,377 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_create(self, resource_group): + response = self.client.network_fabrics.begin_create( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={ + "fabricASN": 0, + "ipv4Prefix": "str", + "location": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + }, + "workloadVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + }, + }, + "networkFabricControllerId": "str", + "networkFabricSku": "str", + "serverCountPerRack": 0, + "terminalServerConfiguration": { + "networkDeviceId": "str", + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "fabricVersion": "str", + "id": "str", + "ipv6Prefix": "str", + "l2IsolationDomains": ["str"], + "l3IsolationDomains": ["str"], + "name": "str", + "provisioningState": "str", + "rackCount": 0, + "racks": ["str"], + "routerIds": ["str"], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_get(self, resource_group): + response = self.client.network_fabrics.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_update(self, resource_group): + response = self.client.network_fabrics.begin_update( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={ + "annotation": "str", + "fabricASN": 0, + "ipv4Prefix": "str", + "ipv6Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + "workloadVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + }, + "rackCount": 0, + "serverCountPerRack": 0, + "tags": {"str": "str"}, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_delete(self, resource_group): + response = self.client.network_fabrics.begin_delete( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_list_by_resource_group(self, resource_group): + response = self.client.network_fabrics.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_list_by_subscription(self, resource_group): + response = self.client.network_fabrics.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_provision(self, resource_group): + response = self.client.network_fabrics.begin_provision( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_deprovision(self, resource_group): + response = self.client.network_fabrics.begin_deprovision( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_upgrade(self, resource_group): + response = self.client.network_fabrics.begin_upgrade( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"action": "str", "version": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_refresh_configuration(self, resource_group): + response = self.client.network_fabrics.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_update_workload_management_bfd_configuration(self, resource_group): + response = self.client.network_fabrics.begin_update_workload_management_bfd_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_update_infra_management_bfd_configuration(self, resource_group): + response = self.client.network_fabrics.begin_update_infra_management_bfd_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_validate_configuration(self, resource_group): + response = self.client.network_fabrics.begin_validate_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"validateAction": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_get_topology(self, resource_group): + response = self.client.network_fabrics.begin_get_topology( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_commit_configuration(self, resource_group): + response = self.client.network_fabrics.begin_commit_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py new file mode 100644 index 000000000000..44d47e840ad7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py @@ -0,0 +1,402 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkFabricsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_create(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_create( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={ + "fabricASN": 0, + "ipv4Prefix": "str", + "location": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + }, + "workloadVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + }, + }, + "networkFabricControllerId": "str", + "networkFabricSku": "str", + "serverCountPerRack": 0, + "terminalServerConfiguration": { + "networkDeviceId": "str", + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "fabricVersion": "str", + "id": "str", + "ipv6Prefix": "str", + "l2IsolationDomains": ["str"], + "l3IsolationDomains": ["str"], + "name": "str", + "provisioningState": "str", + "rackCount": 0, + "racks": ["str"], + "routerIds": ["str"], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_get(self, resource_group): + response = await self.client.network_fabrics.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_update(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_update( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={ + "annotation": "str", + "fabricASN": 0, + "ipv4Prefix": "str", + "ipv6Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + "workloadVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "mtu": 1500, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "peeringOption": "str", + }, + }, + "rackCount": 0, + "serverCountPerRack": 0, + "tags": {"str": "str"}, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_delete(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_delete( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_list_by_resource_group(self, resource_group): + response = self.client.network_fabrics.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_list_by_subscription(self, resource_group): + response = self.client.network_fabrics.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_provision(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_provision( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_deprovision(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_deprovision( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_upgrade(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_upgrade( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"action": "str", "version": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_refresh_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_update_workload_management_bfd_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_update_workload_management_bfd_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_update_infra_management_bfd_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_update_infra_management_bfd_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_validate_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"validateAction": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_get_topology(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_get_topology( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_commit_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_commit_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py new file mode 100644 index 000000000000..ef280cdf3d4f --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py @@ -0,0 +1,119 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkInterfacesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_begin_create(self, resource_group): + response = self.client.network_interfaces.begin_create( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={ + "administrativeState": "str", + "annotation": "str", + "connectedTo": "str", + "id": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "name": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_get(self, resource_group): + response = self.client.network_interfaces.get( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_begin_update(self, resource_group): + response = self.client.network_interfaces.begin_update( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={"annotation": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_begin_delete(self, resource_group): + response = self.client.network_interfaces.begin_delete( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_list_by_network_device(self, resource_group): + response = self.client.network_interfaces.list_by_network_device( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_begin_update_administrative_state(self, resource_group): + response = self.client.network_interfaces.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py new file mode 100644 index 000000000000..052af38c395c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py @@ -0,0 +1,128 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkInterfacesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_begin_create(self, resource_group): + response = await ( + await self.client.network_interfaces.begin_create( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={ + "administrativeState": "str", + "annotation": "str", + "connectedTo": "str", + "id": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "name": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_get(self, resource_group): + response = await self.client.network_interfaces.get( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_begin_update(self, resource_group): + response = await ( + await self.client.network_interfaces.begin_update( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={"annotation": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_begin_delete(self, resource_group): + response = await ( + await self.client.network_interfaces.begin_delete( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_list_by_network_device(self, resource_group): + response = self.client.network_interfaces.list_by_network_device( + resource_group_name=resource_group.name, + network_device_name="str", + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_interfaces.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py new file mode 100644 index 000000000000..89054b5c3c22 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py @@ -0,0 +1,110 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkPacketBrokersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_begin_create(self, resource_group): + response = self.client.network_packet_brokers.begin_create( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "id": "str", + "name": "str", + "neighborGroupIds": ["str"], + "networkDeviceIds": ["str"], + "networkTapIds": ["str"], + "provisioningState": "str", + "sourceInterfaceIds": ["str"], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_get(self, resource_group): + response = self.client.network_packet_brokers.get( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_begin_update(self, resource_group): + response = self.client.network_packet_brokers.begin_update( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_begin_delete(self, resource_group): + response = self.client.network_packet_brokers.begin_delete( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_list_by_resource_group(self, resource_group): + response = self.client.network_packet_brokers.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_list_by_subscription(self, resource_group): + response = self.client.network_packet_brokers.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py new file mode 100644 index 000000000000..b726f6dfd0a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py @@ -0,0 +1,117 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkPacketBrokersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_begin_create(self, resource_group): + response = await ( + await self.client.network_packet_brokers.begin_create( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "id": "str", + "name": "str", + "neighborGroupIds": ["str"], + "networkDeviceIds": ["str"], + "networkTapIds": ["str"], + "provisioningState": "str", + "sourceInterfaceIds": ["str"], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_get(self, resource_group): + response = await self.client.network_packet_brokers.get( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_begin_update(self, resource_group): + response = await ( + await self.client.network_packet_brokers.begin_update( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_begin_delete(self, resource_group): + response = await ( + await self.client.network_packet_brokers.begin_delete( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_list_by_resource_group(self, resource_group): + response = self.client.network_packet_brokers.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_list_by_subscription(self, resource_group): + response = self.client.network_packet_brokers.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py new file mode 100644 index 000000000000..5651179314ab --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py @@ -0,0 +1,109 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkRacksOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_begin_create(self, resource_group): + response = self.client.network_racks.begin_create( + resource_group_name=resource_group.name, + network_rack_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "annotation": "str", + "id": "str", + "name": "str", + "networkDevices": ["str"], + "networkRackType": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_get(self, resource_group): + response = self.client.network_racks.get( + resource_group_name=resource_group.name, + network_rack_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_begin_update(self, resource_group): + response = self.client.network_racks.begin_update( + resource_group_name=resource_group.name, + network_rack_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_begin_delete(self, resource_group): + response = self.client.network_racks.begin_delete( + resource_group_name=resource_group.name, + network_rack_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_list_by_resource_group(self, resource_group): + response = self.client.network_racks.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_list_by_subscription(self, resource_group): + response = self.client.network_racks.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py new file mode 100644 index 000000000000..decdef317471 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py @@ -0,0 +1,116 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkRacksOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_begin_create(self, resource_group): + response = await ( + await self.client.network_racks.begin_create( + resource_group_name=resource_group.name, + network_rack_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "annotation": "str", + "id": "str", + "name": "str", + "networkDevices": ["str"], + "networkRackType": "str", + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_get(self, resource_group): + response = await self.client.network_racks.get( + resource_group_name=resource_group.name, + network_rack_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_begin_update(self, resource_group): + response = await ( + await self.client.network_racks.begin_update( + resource_group_name=resource_group.name, + network_rack_name="str", + body={"tags": {"str": "str"}}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_begin_delete(self, resource_group): + response = await ( + await self.client.network_racks.begin_delete( + resource_group_name=resource_group.name, + network_rack_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_list_by_resource_group(self, resource_group): + response = self.client.network_racks.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_list_by_subscription(self, resource_group): + response = self.client.network_racks.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py new file mode 100644 index 000000000000..361845fcf73b --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py @@ -0,0 +1,247 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkTapRulesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_create(self, resource_group): + response = self.client.network_tap_rules.begin_create( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "id": "str", + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", + "type": "str", + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "None", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "name": "str", + "networkTapId": "str", + "pollingIntervalInSeconds": 30, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "tapRulesUrl": "str", + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_get(self, resource_group): + response = self.client.network_tap_rules.get( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_update(self, resource_group): + response = self.client.network_tap_rules.begin_update( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={ + "annotation": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", + "type": "str", + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "None", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tags": {"str": "str"}, + "tapRulesUrl": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_delete(self, resource_group): + response = self.client.network_tap_rules.begin_delete( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_list_by_resource_group(self, resource_group): + response = self.client.network_tap_rules.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_list_by_subscription(self, resource_group): + response = self.client.network_tap_rules.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_update_administrative_state(self, resource_group): + response = self.client.network_tap_rules.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_resync(self, resource_group): + response = self.client.network_tap_rules.begin_resync( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_begin_validate_configuration(self, resource_group): + response = self.client.network_tap_rules.begin_validate_configuration( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py new file mode 100644 index 000000000000..997d945646fc --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py @@ -0,0 +1,260 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkTapRulesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_create(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_create( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={ + "location": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "id": "str", + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", + "type": "str", + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "None", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "name": "str", + "networkTapId": "str", + "pollingIntervalInSeconds": 30, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "tapRulesUrl": "str", + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_get(self, resource_group): + response = await self.client.network_tap_rules.get( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_update(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_update( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={ + "annotation": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", + "type": "str", + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "None", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tags": {"str": "str"}, + "tapRulesUrl": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_delete(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_delete( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_list_by_resource_group(self, resource_group): + response = self.client.network_tap_rules.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_list_by_subscription(self, resource_group): + response = self.client.network_tap_rules.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_resync(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_resync( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.network_tap_rules.begin_validate_configuration( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py new file mode 100644 index 000000000000..8d10c29448ae --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py @@ -0,0 +1,158 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkTapsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_begin_create(self, resource_group): + response = self.client.network_taps.begin_create( + resource_group_name=resource_group.name, + network_tap_name="str", + body={ + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "location": "str", + "networkPacketBrokerId": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "name": "str", + "pollingType": "str", + "provisioningState": "str", + "sourceTapRuleId": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_get(self, resource_group): + response = self.client.network_taps.get( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_begin_update(self, resource_group): + response = self.client.network_taps.begin_update( + resource_group_name=resource_group.name, + network_tap_name="str", + body={ + "annotation": "str", + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "pollingType": "str", + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_begin_delete(self, resource_group): + response = self.client.network_taps.begin_delete( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_list_by_resource_group(self, resource_group): + response = self.client.network_taps.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_list_by_subscription(self, resource_group): + response = self.client.network_taps.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_begin_update_administrative_state(self, resource_group): + response = self.client.network_taps.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_tap_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_begin_resync(self, resource_group): + response = self.client.network_taps.begin_resync( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py new file mode 100644 index 000000000000..8c7048da3718 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py @@ -0,0 +1,169 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkTapsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_begin_create(self, resource_group): + response = await ( + await self.client.network_taps.begin_create( + resource_group_name=resource_group.name, + network_tap_name="str", + body={ + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "location": "str", + "networkPacketBrokerId": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "id": "str", + "name": "str", + "pollingType": "str", + "provisioningState": "str", + "sourceTapRuleId": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_get(self, resource_group): + response = await self.client.network_taps.get( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_begin_update(self, resource_group): + response = await ( + await self.client.network_taps.begin_update( + resource_group_name=resource_group.name, + network_tap_name="str", + body={ + "annotation": "str", + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "pollingType": "str", + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_begin_delete(self, resource_group): + response = await ( + await self.client.network_taps.begin_delete( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_list_by_resource_group(self, resource_group): + response = self.client.network_taps.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_list_by_subscription(self, resource_group): + response = self.client.network_taps.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_taps.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_tap_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_begin_resync(self, resource_group): + response = await ( + await self.client.network_taps.begin_resync( + resource_group_name=resource_group.name, + network_tap_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py new file mode 100644 index 000000000000..97c9f9087080 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py @@ -0,0 +1,191 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkToNetworkInterconnectsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_create(self, resource_group): + response = self.client.network_to_network_interconnects.begin_create( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={ + "useOptionB": "str", + "administrativeState": "str", + "configurationState": "str", + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isManagementType": "True", + "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, + "name": "str", + "nniType": "CE", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "fabricASN": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_get(self, resource_group): + response = self.client.network_to_network_interconnects.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_update(self, resource_group): + response = self.client.network_to_network_interconnects.begin_update( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={ + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, + "name": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "fabricASN": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_delete(self, resource_group): + response = self.client.network_to_network_interconnects.begin_delete( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_list_by_network_fabric(self, resource_group): + response = self.client.network_to_network_interconnects.list_by_network_fabric( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_update_npb_static_route_bfd_administrative_state( + self, resource_group + ): + response = self.client.network_to_network_interconnects.begin_update_npb_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_update_administrative_state(self, resource_group): + response = self.client.network_to_network_interconnects.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py new file mode 100644 index 000000000000..f744ae0e7a55 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py @@ -0,0 +1,202 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkToNetworkInterconnectsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_create(self, resource_group): + response = await ( + await self.client.network_to_network_interconnects.begin_create( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={ + "useOptionB": "str", + "administrativeState": "str", + "configurationState": "str", + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isManagementType": "True", + "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, + "name": "str", + "nniType": "CE", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "fabricASN": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "provisioningState": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_get(self, resource_group): + response = await self.client.network_to_network_interconnects.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_update(self, resource_group): + response = await ( + await self.client.network_to_network_interconnects.begin_update( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={ + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "id": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, + "name": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "Disabled", + "intervalInMilliSeconds": 300, + "multiplier": 5, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "fabricASN": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_delete(self, resource_group): + response = await ( + await self.client.network_to_network_interconnects.begin_delete( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_list_by_network_fabric(self, resource_group): + response = self.client.network_to_network_interconnects.list_by_network_fabric( + resource_group_name=resource_group.name, + network_fabric_name="str", + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_update_npb_static_route_bfd_administrative_state( + self, resource_group + ): + response = await ( + await self.client.network_to_network_interconnects.begin_update_npb_static_route_bfd_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_to_network_interconnects.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py new file mode 100644 index 000000000000..6cf5adc3a6c2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py @@ -0,0 +1,29 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py new file mode 100644 index 000000000000..fa0dd7e1a3b9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py @@ -0,0 +1,30 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_list(self, resource_group): + response = self.client.operations.list( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py new file mode 100644 index 000000000000..a3ee27b4297c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py @@ -0,0 +1,203 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtRoutePoliciesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_create(self, resource_group): + response = self.client.route_policies.begin_create( + resource_group_name=resource_group.name, + route_policy_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "addressFamilyType": "IPv4", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "defaultAction": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, + }, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "Or", + }, + "sequenceNumber": 0, + "annotation": "str", + } + ], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_get(self, resource_group): + response = self.client.route_policies.get( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_update(self, resource_group): + response = self.client.route_policies.begin_update( + resource_group_name=resource_group.name, + route_policy_name="str", + body={ + "defaultAction": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, + }, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "Or", + }, + "sequenceNumber": 0, + "annotation": "str", + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_delete(self, resource_group): + response = self.client.route_policies.begin_delete( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_list_by_resource_group(self, resource_group): + response = self.client.route_policies.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_list_by_subscription(self, resource_group): + response = self.client.route_policies.list_by_subscription( + api_version="2023-06-15", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_update_administrative_state(self, resource_group): + response = self.client.route_policies.begin_update_administrative_state( + resource_group_name=resource_group.name, + route_policy_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_validate_configuration(self, resource_group): + response = self.client.route_policies.begin_validate_configuration( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_begin_commit_configuration(self, resource_group): + response = self.client.route_policies.begin_commit_configuration( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py new file mode 100644 index 000000000000..02d6b53d1eca --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py @@ -0,0 +1,216 @@ +# 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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtRoutePoliciesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_create(self, resource_group): + response = await ( + await self.client.route_policies.begin_create( + resource_group_name=resource_group.name, + route_policy_name="str", + body={ + "location": "str", + "networkFabricId": "str", + "addressFamilyType": "IPv4", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "defaultAction": "str", + "id": "str", + "name": "str", + "provisioningState": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, + }, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "Or", + }, + "sequenceNumber": 0, + "annotation": "str", + } + ], + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_get(self, resource_group): + response = await self.client.route_policies.get( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_update(self, resource_group): + response = await ( + await self.client.route_policies.begin_update( + resource_group_name=resource_group.name, + route_policy_name="str", + body={ + "defaultAction": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, + }, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "Or", + }, + "sequenceNumber": 0, + "annotation": "str", + } + ], + "tags": {"str": "str"}, + }, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_delete(self, resource_group): + response = await ( + await self.client.route_policies.begin_delete( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_list_by_resource_group(self, resource_group): + response = self.client.route_policies.list_by_resource_group( + resource_group_name=resource_group.name, + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_list_by_subscription(self, resource_group): + response = self.client.route_policies.list_by_subscription( + api_version="2023-06-15", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.route_policies.begin_update_administrative_state( + resource_group_name=resource_group.name, + route_policy_name="str", + body={"resourceIds": ["str"], "state": "str"}, + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_validate_configuration(self, resource_group): + response = await ( + await self.client.route_policies.begin_validate_configuration( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_begin_commit_configuration(self, resource_group): + response = await ( + await self.client.route_policies.begin_commit_configuration( + resource_group_name=resource_group.name, + route_policy_name="str", + api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml index 540da07d41af..3f944bb376dd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml @@ -1,6 +1,88 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-managednetworkfabric" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Managednetworkfabric Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.managednetworkfabric._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-managednetworkfabric" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Managednetworkfabric Management" +package_doc_id = "" +is_stable = true +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +title = "ManagedNetworkFabricMgmtClient" +exclude_folders = "" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/sdk_packaging.toml b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/sdk_packaging.toml deleted file mode 100644 index c89fab30ee36..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/sdk_packaging.toml +++ /dev/null @@ -1,11 +0,0 @@ -[packaging] -package_name = "azure-mgmt-managednetworkfabric" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "Managednetworkfabric Management" -package_doc_id = "" -is_stable = true -is_arm = true -need_msrestazure = false -need_azuremgmtcore = true -sample_link = "" -title = "ManagedNetworkFabricMgmtClient" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py deleted file mode 100644 index a222ce417493..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-managednetworkfabric" -PACKAGE_PPRINT_NAME = "Managednetworkfabric Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate<1.0.0,>=0.6.1", - "azure-common~=1.1", - "azure-mgmt-core>=1.3.2,<2.0.0", - "typing-extensions>=4.3.0; python_version<'3.8.0'", - ], - python_requires=">=3.7", -) From 9b7e9f472e832b731867784bde62494e6e34b9ac Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 12:31:14 +0800 Subject: [PATCH 2/6] generated from typespec:e1758ffaeafcd7fd6eeaf2d45c38474b362544a6 --- .../_metadata.json | 15 +- .../apiview-properties.json | 1454 +- .../mgmt/managednetworkfabric/__init__.py | 4 +- ...twork_fabric_mgmt_client.py => _client.py} | 74 +- .../managednetworkfabric/_configuration.py | 15 +- .../azure/mgmt/managednetworkfabric/_patch.py | 14 +- .../managednetworkfabric/_utils/__init__.py | 2 +- .../managednetworkfabric/_utils/model_base.py | 1737 + .../_utils/serialization.py | 31 +- .../mgmt/managednetworkfabric/_validation.py | 66 + .../mgmt/managednetworkfabric/_version.py | 3 +- .../mgmt/managednetworkfabric/aio/__init__.py | 4 +- ...twork_fabric_mgmt_client.py => _client.py} | 75 +- .../aio/_configuration.py | 15 +- .../mgmt/managednetworkfabric/aio/_patch.py | 14 +- .../aio/operations/__init__.py | 58 +- .../_access_control_lists_operations.py | 1304 - .../_external_networks_operations.py | 1236 - .../_internal_networks_operations.py | 1460 - .../_internet_gateway_rules_operations.py | 845 - .../_internet_gateways_operations.py | 836 - .../operations/_ip_communities_operations.py | 834 - .../_ip_extended_communities_operations.py | 845 - .../aio/operations/_ip_prefixes_operations.py | 824 - .../_l2_isolation_domains_operations.py | 1294 - .../_l3_isolation_domains_operations.py | 1297 - .../operations/_neighbor_groups_operations.py | 830 - .../_network_device_skus_operations.py | 196 - .../operations/_network_devices_operations.py | 1590 - .../_network_fabric_controllers_operations.py | 839 - .../_network_fabric_skus_operations.py | 196 - .../operations/_network_fabrics_operations.py | 2317 - .../_network_interfaces_operations.py | 1009 - .../_network_packet_brokers_operations.py | 833 - .../operations/_network_racks_operations.py | 822 - .../_network_tap_rules_operations.py | 1301 - .../operations/_network_taps_operations.py | 1151 - ...ork_to_network_interconnects_operations.py | 1262 - .../aio/operations/_operations.py | 35049 +++- .../aio/operations/_patch.py | 14 +- .../operations/_route_policies_operations.py | 1281 - .../managednetworkfabric/models/__init__.py | 596 +- .../managednetworkfabric/models/_enums.py | 935 + ...anaged_network_fabric_mgmt_client_enums.py | 409 - .../managednetworkfabric/models/_models.py | 19844 ++ .../models/_models_py3.py | 12445 -- .../managednetworkfabric/models/_patch.py | 14 +- .../operations/__init__.py | 58 +- .../_access_control_lists_operations.py | 1581 - .../_external_networks_operations.py | 1494 - .../_internal_networks_operations.py | 1758 - .../_internet_gateway_rules_operations.py | 1031 - .../_internet_gateways_operations.py | 1010 - .../operations/_ip_communities_operations.py | 1016 - .../_ip_extended_communities_operations.py | 1031 - .../operations/_ip_prefixes_operations.py | 1002 - .../_l2_isolation_domains_operations.py | 1572 - .../_l3_isolation_domains_operations.py | 1575 - .../operations/_neighbor_groups_operations.py | 1004 - .../_network_device_skus_operations.py | 251 - .../operations/_network_devices_operations.py | 1900 - .../_network_fabric_controllers_operations.py | 1036 - .../_network_fabric_skus_operations.py | 251 - .../operations/_network_fabrics_operations.py | 2788 - .../_network_interfaces_operations.py | 1207 - .../_network_packet_brokers_operations.py | 1019 - .../operations/_network_racks_operations.py | 1004 - .../_network_tap_rules_operations.py | 1571 - .../operations/_network_taps_operations.py | 1391 - ...ork_to_network_interconnects_operations.py | 1539 - .../operations/_operations.py | 40634 +++- .../managednetworkfabric/operations/_patch.py | 14 +- .../operations/_route_policies_operations.py | 1561 - .../code_report_typespec.json | 155304 +++++++++++++++ ..._gen.py => access_control_lists_create.py} | 28 +- ..._control_lists_create_control_plane_acl.py | 81 + ..._gen.py => access_control_lists_delete.py} | 9 +- ...set_gen.py => access_control_lists_get.py} | 9 +- ...s_control_lists_list_by_resource_group.py} | 9 +- ...ess_control_lists_list_by_subscription.py} | 9 +- ..._gen.py => access_control_lists_resync.py} | 9 +- ..._gen.py => access_control_lists_update.py} | 26 +- ...trol_lists_update_administrative_state.py} | 9 +- ...s_control_lists_validate_configuration.py} | 9 +- ...set_gen.py => external_networks_create.py} | 38 +- .../external_networks_delete.py | 42 + ...xternal_networks_delete_maximum_set_gen.py | 43 - .../external_networks_get.py | 43 + .../external_networks_get_maximum_set_gen.py | 44 - ...l_networks_list_by_l3_isolation_domain.py} | 11 +- ...set_gen.py => external_networks_update.py} | 39 +- ...al_networks_update_administrative_state.py | 44 + ...te_administrative_state_maximum_set_gen.py | 45 - ...etworks_update_bfd_administrative_state.py | 44 + ..._static_route_bfd_administrative_state.py} | 9 +- ...set_gen.py => internal_networks_create.py} | 39 +- ...set_gen.py => internal_networks_delete.py} | 11 +- ...um_set_gen.py => internal_networks_get.py} | 11 +- ...l_networks_list_by_l3_isolation_domain.py} | 11 +- ...set_gen.py => internal_networks_update.py} | 39 +- ...l_networks_update_administrative_state.py} | 11 +- ...etworks_update_bfd_administrative_state.py | 44 + ...etworks_update_bgp_administrative_state.py | 44 + ...gp_administrative_state_maximum_set_gen.py | 45 - ..._static_route_bfd_administrative_state.py} | 9 +- ...en.py => internet_gateway_rules_create.py} | 20 +- ...en.py => internet_gateway_rules_delete.py} | 9 +- ...t_gen.py => internet_gateway_rules_get.py} | 9 +- ...t_gateway_rules_list_by_resource_group.py} | 9 +- ...net_gateway_rules_list_by_subscription.py} | 9 +- ...en.py => internet_gateway_rules_update.py} | 11 +- ...set_gen.py => internet_gateways_create.py} | 11 +- ...set_gen.py => internet_gateways_delete.py} | 9 +- ...um_set_gen.py => internet_gateways_get.py} | 9 +- ...ternet_gateways_list_by_resource_group.py} | 9 +- ...internet_gateways_list_by_subscription.py} | 9 +- ...set_gen.py => internet_gateways_update.py} | 10 +- ...um_set_gen.py => ip_communities_create.py} | 12 +- ...um_set_gen.py => ip_communities_delete.py} | 9 +- ...ximum_set_gen.py => ip_communities_get.py} | 9 +- ... ip_communities_list_by_resource_group.py} | 9 +- ...=> ip_communities_list_by_subscription.py} | 9 +- ...um_set_gen.py => ip_communities_update.py} | 12 +- ...n.py => ip_extended_communities_create.py} | 12 +- ...n.py => ip_extended_communities_delete.py} | 9 +- ..._gen.py => ip_extended_communities_get.py} | 9 +- ...ded_communities_list_by_resource_group.py} | 9 +- ...ended_communities_list_by_subscription.py} | 9 +- ...n.py => ip_extended_communities_update.py} | 14 +- ...ximum_set_gen.py => ip_prefixes_create.py} | 12 +- ...ximum_set_gen.py => ip_prefixes_delete.py} | 9 +- ..._maximum_set_gen.py => ip_prefixes_get.py} | 9 +- ... => ip_prefixes_list_by_resource_group.py} | 9 +- ...py => ip_prefixes_list_by_subscription.py} | 9 +- ...ximum_set_gen.py => ip_prefixes_update.py} | 11 +- ...isolation_domains_commit_configuration.py} | 9 +- ..._gen.py => l2_isolation_domains_create.py} | 14 +- ..._gen.py => l2_isolation_domains_delete.py} | 11 +- ...set_gen.py => l2_isolation_domains_get.py} | 11 +- ...olation_domains_list_by_resource_group.py} | 9 +- ...isolation_domains_list_by_subscription.py} | 9 +- .../l2_isolation_domains_update.py | 52 + ...on_domains_update_administrative_state.py} | 11 +- ...solation_domains_update_maximum_set_gen.py | 44 - ...olation_domains_validate_configuration.py} | 9 +- ...isolation_domains_commit_configuration.py} | 9 +- ..._gen.py => l3_isolation_domains_create.py} | 26 +- ..._gen.py => l3_isolation_domains_delete.py} | 9 +- ...set_gen.py => l3_isolation_domains_get.py} | 9 +- ...olation_domains_list_by_resource_group.py} | 9 +- ...isolation_domains_list_by_subscription.py} | 9 +- ..._gen.py => l3_isolation_domains_update.py} | 29 +- ...on_domains_update_administrative_state.py} | 9 +- ...olation_domains_validate_configuration.py} | 9 +- ...m_set_gen.py => neighbor_groups_create.py} | 12 +- ...m_set_gen.py => neighbor_groups_delete.py} | 9 +- ...imum_set_gen.py => neighbor_groups_get.py} | 9 +- ...neighbor_groups_list_by_resource_group.py} | 9 +- ...> neighbor_groups_list_by_subscription.py} | 9 +- .../neighbor_groups_resync.py | 42 + ...m_set_gen.py => neighbor_groups_update.py} | 12 +- ...py => network_bootstrap_devices_create.py} | 17 +- .../network_bootstrap_devices_delete.py | 41 + .../network_bootstrap_devices_get.py | 42 + ...ootstrap_devices_list_by_resource_group.py | 42 + ..._bootstrap_devices_list_by_subscription.py | 40 + .../network_bootstrap_devices_reboot.py | 42 + ...bootstrap_devices_refresh_configuration.py | 42 + ...work_bootstrap_devices_resync_passwords.py | 42 + ...py => network_bootstrap_devices_update.py} | 16 +- ...rap_devices_update_administrative_state.py | 49 + .../network_bootstrap_devices_upgrade.py | 43 + .../network_bootstrap_interfaces_create.py | 52 + .../network_bootstrap_interfaces_delete.py | 42 + .../network_bootstrap_interfaces_get.py | 43 + ...rfaces_list_by_network_bootstrap_device.py | 43 + .../network_bootstrap_interfaces_update.py | 46 + ..._interfaces_update_administrative_state.py | 44 + ..._set_gen.py => network_device_skus_get.py} | 9 +- ...twork_device_skus_list_by_subscription.py} | 9 +- .../network_devices_create.py | 65 + ...m_set_gen.py => network_devices_delete.py} | 9 +- ...imum_set_gen.py => network_devices_get.py} | 9 +- ...network_devices_list_by_resource_group.py} | 9 +- ...> network_devices_list_by_subscription.py} | 9 +- ...m_set_gen.py => network_devices_reboot.py} | 9 +- ... network_devices_refresh_configuration.py} | 9 +- .../network_devices_resync_certificates.py | 42 + ...twork_devices_resync_certificates_error.py | 42 + .../network_devices_resync_passwords.py | 42 + .../network_devices_resync_passwords_error.py | 42 + .../network_devices_run_ro_command.py | 43 + .../network_devices_run_rw_command.py | 46 + .../network_devices_update.py | 61 + ...rk_devices_update_administrative_state.py} | 9 +- ..._set_gen.py => network_devices_upgrade.py} | 13 +- ...y => network_fabric_controllers_create.py} | 16 +- ...y => network_fabric_controllers_delete.py} | 9 +- ...n.py => network_fabric_controllers_get.py} | 9 +- ...ric_controllers_list_by_resource_group.py} | 9 +- ...abric_controllers_list_by_subscription.py} | 9 +- ...y => network_fabric_controllers_update.py} | 16 +- ..._set_gen.py => network_fabric_skus_get.py} | 9 +- ...twork_fabric_skus_list_by_subscription.py} | 9 +- .../network_fabrics_arm_configuration_diff.py | 42 + .../network_fabrics_commit_batch_status.py | 43 + ...> network_fabrics_commit_configuration.py} | 11 +- ...m_set_gen.py => network_fabrics_create.py} | 53 +- ...m_set_gen.py => network_fabrics_delete.py} | 9 +- ..._gen.py => network_fabrics_deprovision.py} | 9 +- .../network_fabrics_discard_commit_batch.py | 43 + ...imum_set_gen.py => network_fabrics_get.py} | 9 +- ...gen.py => network_fabrics_get_topology.py} | 9 +- ...network_fabrics_list_by_resource_group.py} | 9 +- ...> network_fabrics_list_by_subscription.py} | 9 +- .../network_fabrics_lock_fabric.py | 43 + ...et_gen.py => network_fabrics_provision.py} | 9 +- ... network_fabrics_refresh_configuration.py} | 9 +- .../network_fabrics_resync_certificates.py | 42 + ...twork_fabrics_resync_certificates_error.py | 42 + ...ics_resync_certificates_partial_success.py | 42 + .../network_fabrics_resync_passwords.py | 42 + .../network_fabrics_resync_passwords_error.py | 42 + ...abrics_resync_passwords_partial_success.py | 42 + .../network_fabrics_rotate_certificates.py | 42 + ...twork_fabrics_rotate_certificates_error.py | 42 + ...ics_rotate_certificates_partial_success.py | 42 + .../network_fabrics_rotate_passwords.py | 42 + .../network_fabrics_rotate_passwords_error.py | 42 + ...abrics_rotate_passwords_partial_success.py | 42 + ...m_set_gen.py => network_fabrics_update.py} | 35 +- ...ate_infra_management_bfd_configuration.py} | 9 +- .../network_fabrics_update_qo_s.py | 43 + ..._workload_management_bfd_configuration.py} | 9 +- ..._set_gen.py => network_fabrics_upgrade.py} | 9 +- ...network_fabrics_validate_configuration.py} | 9 +- ...twork_fabrics_view_device_configuration.py | 42 + ...et_gen.py => network_interfaces_create.py} | 17 +- .../network_interfaces_delete.py | 42 + ...twork_interfaces_delete_maximum_set_gen.py | 43 - ...m_set_gen.py => network_interfaces_get.py} | 9 +- ...work_interfaces_list_by_network_device.py} | 9 +- ...et_gen.py => network_interfaces_update.py} | 11 +- ...interfaces_update_administrative_state.py} | 9 +- .../network_monitors_create.py | 67 + .../network_monitors_delete.py | 41 + .../generated_samples/network_monitors_get.py | 42 + ...network_monitors_list_by_resource_group.py | 42 + .../network_monitors_list_by_subscription.py | 40 + .../network_monitors_update.py | 64 + ...rk_monitors_update_administrative_state.py | 43 + ...en.py => network_packet_brokers_create.py} | 11 +- ...en.py => network_packet_brokers_delete.py} | 9 +- ...t_gen.py => network_packet_brokers_get.py} | 9 +- ..._packet_brokers_list_by_resource_group.py} | 9 +- ...rk_packet_brokers_list_by_subscription.py} | 9 +- ...en.py => network_packet_brokers_update.py} | 11 +- ...mum_set_gen.py => network_racks_create.py} | 10 +- ...mum_set_gen.py => network_racks_delete.py} | 9 +- ...aximum_set_gen.py => network_racks_get.py} | 9 +- ...> network_racks_list_by_resource_group.py} | 9 +- ... => network_racks_list_by_subscription.py} | 9 +- ...mum_set_gen.py => network_racks_update.py} | 11 +- ...set_gen.py => network_tap_rules_create.py} | 36 +- ...set_gen.py => network_tap_rules_delete.py} | 9 +- ...um_set_gen.py => network_tap_rules_get.py} | 9 +- ...twork_tap_rules_list_by_resource_group.py} | 9 +- ...network_tap_rules_list_by_subscription.py} | 9 +- ...set_gen.py => network_tap_rules_resync.py} | 9 +- ...set_gen.py => network_tap_rules_update.py} | 32 +- ..._tap_rules_update_administrative_state.py} | 15 +- ...twork_tap_rules_validate_configuration.py} | 9 +- ...imum_set_gen.py => network_taps_create.py} | 12 +- ...imum_set_gen.py => network_taps_delete.py} | 9 +- ...maximum_set_gen.py => network_taps_get.py} | 9 +- ...=> network_taps_list_by_resource_group.py} | 9 +- ...y => network_taps_list_by_subscription.py} | 9 +- ...imum_set_gen.py => network_taps_resync.py} | 9 +- ...imum_set_gen.py => network_taps_update.py} | 11 +- ...twork_taps_update_administrative_state.py} | 9 +- ...etwork_to_network_interconnects_create.py} | 29 +- ...etwork_to_network_interconnects_delete.py} | 11 +- ...> network_to_network_interconnects_get.py} | 11 +- ...k_interconnects_list_by_network_fabric.py} | 11 +- ...etwork_to_network_interconnects_update.py} | 33 +- ...erconnects_update_administrative_state.py} | 17 +- ...onnects_update_bfd_administrative_state.py | 44 + ..._static_route_bfd_administrative_state.py} | 9 +- ...{list_operations.py => operations_list.py} | 7 +- ...=> route_policies_commit_configuration.py} | 9 +- ...um_set_gen.py => route_policies_create.py} | 13 +- ...um_set_gen.py => route_policies_delete.py} | 9 +- ...ximum_set_gen.py => route_policies_get.py} | 9 +- ... route_policies_list_by_resource_group.py} | 9 +- ...=> route_policies_list_by_subscription.py} | 9 +- ...um_set_gen.py => route_policies_update.py} | 12 +- ...e_policies_update_administrative_state.py} | 9 +- ... route_policies_validate_configuration.py} | 9 +- .../generated_tests/conftest.py | 2 +- ...ic_mgmt_access_control_lists_operations.py | 312 +- ...t_access_control_lists_operations_async.py | 312 +- ...abric_mgmt_external_networks_operations.py | 220 +- ...mgmt_external_networks_operations_async.py | 222 +- ...abric_mgmt_internal_networks_operations.py | 249 +- ...mgmt_internal_networks_operations_async.py | 251 +- ..._mgmt_internet_gateway_rules_operations.py | 51 +- ...internet_gateway_rules_operations_async.py | 51 +- ...abric_mgmt_internet_gateways_operations.py | 52 +- ...mgmt_internet_gateways_operations_async.py | 52 +- ...k_fabric_mgmt_ip_communities_operations.py | 69 +- ...ic_mgmt_ip_communities_operations_async.py | 79 +- ...mgmt_ip_extended_communities_operations.py | 53 +- ...p_extended_communities_operations_async.py | 53 +- ...work_fabric_mgmt_ip_prefixes_operations.py | 85 +- ...abric_mgmt_ip_prefixes_operations_async.py | 85 +- ...ic_mgmt_l2_isolation_domains_operations.py | 105 +- ...t_l2_isolation_domains_operations_async.py | 109 +- ...ic_mgmt_l3_isolation_domains_operations.py | 104 +- ...t_l3_isolation_domains_operations_async.py | 108 +- ..._fabric_mgmt_neighbor_groups_operations.py | 75 +- ...c_mgmt_neighbor_groups_operations_async.py | 77 +- ...mt_network_bootstrap_devices_operations.py | 183 + ...work_bootstrap_devices_operations_async.py | 200 + ...network_bootstrap_interfaces_operations.py | 119 + ...k_bootstrap_interfaces_operations_async.py | 128 + ...ric_mgmt_network_device_skus_operations.py | 7 +- ...mt_network_device_skus_operations_async.py | 7 +- ..._fabric_mgmt_network_devices_operations.py | 162 +- ...c_mgmt_network_devices_operations_async.py | 170 +- ...t_network_fabric_controllers_operations.py | 95 +- ...ork_fabric_controllers_operations_async.py | 95 +- ...ric_mgmt_network_fabric_skus_operations.py | 7 +- ...mt_network_fabric_skus_operations_async.py | 7 +- ..._fabric_mgmt_network_fabrics_operations.py | 491 +- ...c_mgmt_network_fabrics_operations_async.py | 509 +- ...bric_mgmt_network_interfaces_operations.py | 69 +- ...gmt_network_interfaces_operations_async.py | 69 +- ...fabric_mgmt_network_monitors_operations.py | 148 + ..._mgmt_network_monitors_operations_async.py | 165 + ..._mgmt_network_packet_brokers_operations.py | 63 +- ...network_packet_brokers_operations_async.py | 63 +- ...rk_fabric_mgmt_network_racks_operations.py | 47 +- ...ric_mgmt_network_racks_operations_async.py | 47 +- ...abric_mgmt_network_tap_rules_operations.py | 263 +- ...mgmt_network_tap_rules_operations_async.py | 263 +- ...ork_fabric_mgmt_network_taps_operations.py | 105 +- ...bric_mgmt_network_taps_operations_async.py | 105 +- ...ork_to_network_interconnects_operations.py | 182 +- ..._network_interconnects_operations_async.py | 184 +- ..._managed_network_fabric_mgmt_operations.py | 6 +- ...ed_network_fabric_mgmt_operations_async.py | 6 +- ...k_fabric_mgmt_route_policies_operations.py | 157 +- ...ic_mgmt_route_policies_operations_async.py | 157 +- .../pyproject.toml | 3 +- .../tsp-location.yaml | 4 + 355 files changed, 263339 insertions(+), 71466 deletions(-) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/{_managed_network_fabric_mgmt_client.py => _client.py} (84%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/model_base.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_validation.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/{_managed_network_fabric_mgmt_client.py => _client.py} (85%) delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_enums.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_typespec.json rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_create_maximum_set_gen.py => access_control_lists_create.py} (77%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_control_plane_acl.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_delete_maximum_set_gen.py => access_control_lists_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_get_maximum_set_gen.py => access_control_lists_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_list_by_resource_group_maximum_set_gen.py => access_control_lists_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_list_by_subscription_maximum_set_gen.py => access_control_lists_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_resync_maximum_set_gen.py => access_control_lists_resync.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_update_maximum_set_gen.py => access_control_lists_update.py} (79%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_update_administrative_state_maximum_set_gen.py => access_control_lists_update_administrative_state.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{access_control_lists_validate_configuration_maximum_set_gen.py => access_control_lists_validate_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{external_networks_create_maximum_set_gen.py => external_networks_create.py} (72%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{external_networks_list_by_l3_isolation_domain_maximum_set_gen.py => external_networks_list_by_l3_isolation_domain.py} (72%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{external_networks_update_maximum_set_gen.py => external_networks_update.py} (67%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_bfd_administrative_state.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py => external_networks_update_static_route_bfd_administrative_state.py} (79%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_create_maximum_set_gen.py => internal_networks_create.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_delete_maximum_set_gen.py => internal_networks_delete.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_get_maximum_set_gen.py => internal_networks_get.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py => internal_networks_list_by_l3_isolation_domain.py} (72%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_update_maximum_set_gen.py => internal_networks_update.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_update_administrative_state_maximum_set_gen.py => internal_networks_update_administrative_state.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bfd_administrative_state.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py => internal_networks_update_static_route_bfd_administrative_state.py} (79%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_create_maximum_set_gen.py => internet_gateway_rules_create.py} (69%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_delete_maximum_set_gen.py => internet_gateway_rules_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_get_maximum_set_gen.py => internet_gateway_rules_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_list_by_resource_group_maximum_set_gen.py => internet_gateway_rules_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_list_by_subscription_maximum_set_gen.py => internet_gateway_rules_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateway_rules_update_maximum_set_gen.py => internet_gateway_rules_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_create_maximum_set_gen.py => internet_gateways_create.py} (83%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_delete_maximum_set_gen.py => internet_gateways_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_get_maximum_set_gen.py => internet_gateways_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_list_by_resource_group_maximum_set_gen.py => internet_gateways_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_list_by_subscription_maximum_set_gen.py => internet_gateways_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{internet_gateways_update_maximum_set_gen.py => internet_gateways_update.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_create_maximum_set_gen.py => ip_communities_create.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_delete_maximum_set_gen.py => ip_communities_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_get_maximum_set_gen.py => ip_communities_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_list_by_resource_group_maximum_set_gen.py => ip_communities_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_list_by_subscription_maximum_set_gen.py => ip_communities_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_communities_update_maximum_set_gen.py => ip_communities_update.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_create_maximum_set_gen.py => ip_extended_communities_create.py} (78%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_delete_maximum_set_gen.py => ip_extended_communities_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_get_maximum_set_gen.py => ip_extended_communities_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_list_by_resource_group_maximum_set_gen.py => ip_extended_communities_list_by_resource_group.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_list_by_subscription_maximum_set_gen.py => ip_extended_communities_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_extended_communities_update_maximum_set_gen.py => ip_extended_communities_update.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_create_maximum_set_gen.py => ip_prefixes_create.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_delete_maximum_set_gen.py => ip_prefixes_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_get_maximum_set_gen.py => ip_prefixes_get.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_list_by_resource_group_maximum_set_gen.py => ip_prefixes_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_list_by_subscription_maximum_set_gen.py => ip_prefixes_list_by_subscription.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{ip_prefixes_update_maximum_set_gen.py => ip_prefixes_update.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_commit_configuration_maximum_set_gen.py => l2_isolation_domains_commit_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_create_maximum_set_gen.py => l2_isolation_domains_create.py} (72%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_delete_maximum_set_gen.py => l2_isolation_domains_delete.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_get_maximum_set_gen.py => l2_isolation_domains_get.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_list_by_resource_group_maximum_set_gen.py => l2_isolation_domains_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_list_by_subscription_maximum_set_gen.py => l2_isolation_domains_list_by_subscription.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_update_administrative_state_maximum_set_gen.py => l2_isolation_domains_update_administrative_state.py} (73%) delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l2_isolation_domains_validate_configuration_maximum_set_gen.py => l2_isolation_domains_validate_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_commit_configuration_maximum_set_gen.py => l3_isolation_domains_commit_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_create_maximum_set_gen.py => l3_isolation_domains_create.py} (67%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_delete_maximum_set_gen.py => l3_isolation_domains_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_get_maximum_set_gen.py => l3_isolation_domains_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_list_by_resource_group_maximum_set_gen.py => l3_isolation_domains_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_list_by_subscription_maximum_set_gen.py => l3_isolation_domains_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_update_maximum_set_gen.py => l3_isolation_domains_update.py} (65%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_update_administrative_state_maximum_set_gen.py => l3_isolation_domains_update_administrative_state.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{l3_isolation_domains_validate_configuration_maximum_set_gen.py => l3_isolation_domains_validate_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_create_maximum_set_gen.py => neighbor_groups_create.py} (81%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_delete_maximum_set_gen.py => neighbor_groups_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_get_maximum_set_gen.py => neighbor_groups_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_list_by_resource_group_maximum_set_gen.py => neighbor_groups_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_list_by_subscription_maximum_set_gen.py => neighbor_groups_list_by_subscription.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_resync.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{neighbor_groups_update_maximum_set_gen.py => neighbor_groups_update.py} (81%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_create_maximum_set_gen.py => network_bootstrap_devices_create.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_delete.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_get.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_resource_group.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_subscription.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_reboot.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_refresh_configuration.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_resync_passwords.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_update_maximum_set_gen.py => network_bootstrap_devices_update.py} (72%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update_administrative_state.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_upgrade.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_create.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_delete.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_get.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_list_by_network_bootstrap_device.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update_administrative_state.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_device_skus_get_maximum_set_gen.py => network_device_skus_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_device_skus_list_by_subscription_maximum_set_gen.py => network_device_skus_list_by_subscription.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_delete_maximum_set_gen.py => network_devices_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_get_maximum_set_gen.py => network_devices_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_list_by_resource_group_maximum_set_gen.py => network_devices_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_list_by_subscription_maximum_set_gen.py => network_devices_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_reboot_maximum_set_gen.py => network_devices_reboot.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_refresh_configuration_maximum_set_gen.py => network_devices_refresh_configuration.py} (75%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_ro_command.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_rw_command.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_update_administrative_state_maximum_set_gen.py => network_devices_update_administrative_state.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_devices_upgrade_maximum_set_gen.py => network_devices_upgrade.py} (72%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_create_maximum_set_gen.py => network_fabric_controllers_create.py} (78%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_delete_maximum_set_gen.py => network_fabric_controllers_delete.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_get_maximum_set_gen.py => network_fabric_controllers_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_list_by_resource_group_maximum_set_gen.py => network_fabric_controllers_list_by_resource_group.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_list_by_subscription_maximum_set_gen.py => network_fabric_controllers_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_controllers_update_maximum_set_gen.py => network_fabric_controllers_update.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_skus_get_maximum_set_gen.py => network_fabric_skus_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabric_skus_list_by_subscription_maximum_set_gen.py => network_fabric_skus_list_by_subscription.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_arm_configuration_diff.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_batch_status.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_commit_configuration_maximum_set_gen.py => network_fabrics_commit_configuration.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_create_maximum_set_gen.py => network_fabrics_create.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_delete_maximum_set_gen.py => network_fabrics_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_deprovision_maximum_set_gen.py => network_fabrics_deprovision.py} (76%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_discard_commit_batch.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_get_maximum_set_gen.py => network_fabrics_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_get_topology_maximum_set_gen.py => network_fabrics_get_topology.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_list_by_resource_group_maximum_set_gen.py => network_fabrics_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_list_by_subscription_maximum_set_gen.py => network_fabrics_list_by_subscription.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_lock_fabric.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_provision_maximum_set_gen.py => network_fabrics_provision.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_refresh_configuration_maximum_set_gen.py => network_fabrics_refresh_configuration.py} (75%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_partial_success.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_partial_success.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_partial_success.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_error.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_partial_success.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_update_maximum_set_gen.py => network_fabrics_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py => network_fabrics_update_infra_management_bfd_configuration.py} (78%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_qo_s.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py => network_fabrics_update_workload_management_bfd_configuration.py} (78%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_upgrade_maximum_set_gen.py => network_fabrics_upgrade.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_fabrics_validate_configuration_maximum_set_gen.py => network_fabrics_validate_configuration.py} (76%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_view_device_configuration.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_interfaces_create_maximum_set_gen.py => network_interfaces_create.py} (74%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete.py delete mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_interfaces_get_maximum_set_gen.py => network_interfaces_get.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_interfaces_list_by_network_device_maximum_set_gen.py => network_interfaces_list_by_network_device.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_interfaces_update_maximum_set_gen.py => network_interfaces_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_interfaces_update_administrative_state_maximum_set_gen.py => network_interfaces_update_administrative_state.py} (76%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_create.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_delete.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_get.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_resource_group.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_subscription.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update_administrative_state.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_create_maximum_set_gen.py => network_packet_brokers_create.py} (80%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_delete_maximum_set_gen.py => network_packet_brokers_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_get_maximum_set_gen.py => network_packet_brokers_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_list_by_resource_group_maximum_set_gen.py => network_packet_brokers_list_by_resource_group.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_list_by_subscription_maximum_set_gen.py => network_packet_brokers_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_packet_brokers_update_maximum_set_gen.py => network_packet_brokers_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_create_maximum_set_gen.py => network_racks_create.py} (82%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_delete_maximum_set_gen.py => network_racks_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_get_maximum_set_gen.py => network_racks_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_list_by_resource_group_maximum_set_gen.py => network_racks_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_list_by_subscription_maximum_set_gen.py => network_racks_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_racks_update_maximum_set_gen.py => network_racks_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_create_maximum_set_gen.py => network_tap_rules_create.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_delete_maximum_set_gen.py => network_tap_rules_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_get_maximum_set_gen.py => network_tap_rules_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_list_by_resource_group_maximum_set_gen.py => network_tap_rules_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_list_by_subscription_maximum_set_gen.py => network_tap_rules_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_resync_maximum_set_gen.py => network_tap_rules_resync.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_update_maximum_set_gen.py => network_tap_rules_update.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_update_administrative_state_maximum_set_gen.py => network_tap_rules_update_administrative_state.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_tap_rules_validate_configuration_maximum_set_gen.py => network_tap_rules_validate_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_create_maximum_set_gen.py => network_taps_create.py} (88%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_delete_maximum_set_gen.py => network_taps_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_get_maximum_set_gen.py => network_taps_get.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_list_by_resource_group_maximum_set_gen.py => network_taps_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_list_by_subscription_maximum_set_gen.py => network_taps_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_resync_maximum_set_gen.py => network_taps_resync.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_update_maximum_set_gen.py => network_taps_update.py} (87%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_taps_update_administrative_state_maximum_set_gen.py => network_taps_update_administrative_state.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_create_maximum_set_gen.py => network_to_network_interconnects_create.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_delete_maximum_set_gen.py => network_to_network_interconnects_delete.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_get_maximum_set_gen.py => network_to_network_interconnects_get.py} (73%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py => network_to_network_interconnects_list_by_network_fabric.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_update_maximum_set_gen.py => network_to_network_interconnects_update.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_update_administrative_state_maximum_set_gen.py => network_to_network_interconnects_update_administrative_state.py} (73%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_bfd_administrative_state.py rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py => network_to_network_interconnects_update_npb_static_route_bfd_administrative_state.py} (77%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{list_operations.py => operations_list.py} (81%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_commit_configuration_maximum_set_gen.py => route_policies_commit_configuration.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_create_maximum_set_gen.py => route_policies_create.py} (92%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_delete_maximum_set_gen.py => route_policies_delete.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_get_maximum_set_gen.py => route_policies_get.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_list_by_resource_group_maximum_set_gen.py => route_policies_list_by_resource_group.py} (75%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_list_by_subscription_maximum_set_gen.py => route_policies_list_by_subscription.py} (74%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_update_maximum_set_gen.py => route_policies_update.py} (92%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_update_administrative_state_maximum_set_gen.py => route_policies_update_administrative_state.py} (76%) rename sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/{route_policies_validate_configuration_maximum_set_gen.py => route_policies_validate_configuration.py} (75%) create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations_async.py create mode 100644 sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/tsp-location.yaml diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json index 34e0f249063d..aabd1ad4fdfa 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/_metadata.json @@ -1,11 +1,10 @@ { - "commit": "b770b86265d5dc3a26b16c5d30a736e6bbba04de", + "apiVersion": "2025-07-15", + "apiVersions": { + "Microsoft.ManagedNetworkFabric": "2025-07-15" + }, + "commit": "e1758ffaeafcd7fd6eeaf2d45c38474b362544a6", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.50.0", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/managednetworkfabric/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\worktrees\\sdk-azure-mgmt-managednetworkfabric\\sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/managednetworkfabric/resource-manager/readme.md" + "typespec_src": "specification/managednetworkfabric/ManagedNetworkFabric.ResourceManager.Management", + "emitterVersion": "0.63.0" } \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json index 9396cd2d9cc3..4cfe1eaaa618 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/apiview-properties.json @@ -1,600 +1,860 @@ { - "CrossLanguagePackageId": null, + "CrossLanguagePackageId": "Microsoft.ManagedNetworkFabric", "CrossLanguageDefinitionId": { - "azure.mgmt.managednetworkfabric.models.Resource": null, - "azure.mgmt.managednetworkfabric.models.TrackedResource": null, - "azure.mgmt.managednetworkfabric.models.AccessControlList": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListAction": null, - "azure.mgmt.managednetworkfabric.models.CommonMatchConditions": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration": null, - "azure.mgmt.managednetworkfabric.models.TagsUpdate": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListPatch": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.AnnotationResource": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.PortCondition": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListProperties": null, - "azure.mgmt.managednetworkfabric.models.AccessControlListsListResult": null, - "azure.mgmt.managednetworkfabric.models.IpCommunitySetOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityDeleteOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityAddOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunitySetOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityDeleteOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityAddOperationProperties": null, - "azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties": null, - "azure.mgmt.managednetworkfabric.models.AggregateRoute": null, - "azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration": null, - "azure.mgmt.managednetworkfabric.models.BfdConfiguration": null, - "azure.mgmt.managednetworkfabric.models.BgpConfiguration": null, - "azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration": null, - "azure.mgmt.managednetworkfabric.models.ErrorResponse": null, - "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate": null, - "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate": null, - "azure.mgmt.managednetworkfabric.models.ConnectedSubnet": null, - "azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy": null, - "azure.mgmt.managednetworkfabric.models.ControllerServices": null, - "azure.mgmt.managednetworkfabric.models.DestinationProperties": null, - "azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties": null, - "azure.mgmt.managednetworkfabric.models.EnableDisableOnResources": null, - "azure.mgmt.managednetworkfabric.models.ErrorAdditionalInfo": null, - "azure.mgmt.managednetworkfabric.models.ErrorDetail": null, - "azure.mgmt.managednetworkfabric.models.ExportRoutePolicy": null, - "azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation": null, - "azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation": null, - "azure.mgmt.managednetworkfabric.models.ExtendedLocation": null, - "azure.mgmt.managednetworkfabric.models.ExtensionEnumProperty": null, - "azure.mgmt.managednetworkfabric.models.ProxyResource": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetwork": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.L3OptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.Layer3IpPrefixProperties": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkProperties": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.ExternalNetworksList": null, - "azure.mgmt.managednetworkfabric.models.ImportRoutePolicy": null, - "azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation": null, - "azure.mgmt.managednetworkfabric.models.InternalNetwork": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkPatch": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkProperties": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration": null, - "azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration": null, - "azure.mgmt.managednetworkfabric.models.InternalNetworksList": null, - "azure.mgmt.managednetworkfabric.models.InternetGateway": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayPatch": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayProperties": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayRule": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayRuleProperties": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewayRulesListResult": null, - "azure.mgmt.managednetworkfabric.models.InternetGatewaysListResult": null, - "azure.mgmt.managednetworkfabric.models.IpCommunitiesListResult": null, - "azure.mgmt.managednetworkfabric.models.IpCommunity": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityIdList": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityPatch": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityProperties": null, - "azure.mgmt.managednetworkfabric.models.IpCommunityRule": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunity": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityListResult": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityProperties": null, - "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule": null, - "azure.mgmt.managednetworkfabric.models.IpGroupProperties": null, - "azure.mgmt.managednetworkfabric.models.IpMatchCondition": null, - "azure.mgmt.managednetworkfabric.models.IpPrefix": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixesListResult": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixPatch": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixProperties": null, - "azure.mgmt.managednetworkfabric.models.IpPrefixRule": null, - "azure.mgmt.managednetworkfabric.models.IsolationDomainProperties": null, - "azure.mgmt.managednetworkfabric.models.L2IsolationDomain": null, - "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch": null, - "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.L2IsolationDomainProperties": null, - "azure.mgmt.managednetworkfabric.models.L2IsolationDomainsListResult": null, - "azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomain": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomainProperties": null, - "azure.mgmt.managednetworkfabric.models.L3IsolationDomainsListResult": null, - "azure.mgmt.managednetworkfabric.models.L3OptionBProperties": null, - "azure.mgmt.managednetworkfabric.models.Layer2Configuration": null, - "azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration": null, - "azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties": null, - "azure.mgmt.managednetworkfabric.models.NeighborAddress": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroup": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupDestination": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupPatch": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupProperties": null, - "azure.mgmt.managednetworkfabric.models.NeighborGroupsListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkDevice": null, - "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters": null, - "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParametersProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkDeviceProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkDeviceSku": null, - "azure.mgmt.managednetworkfabric.models.NetworkDeviceSkusListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkDevicesListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabric": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricController": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricControllersListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricPatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.TerminalServerPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricSku": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricSkusListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricsListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkInterface": null, - "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatchProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkInterfaceProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkInterfacesList": null, - "azure.mgmt.managednetworkfabric.models.NetworkPacketBroker": null, - "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokersListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkRack": null, - "azure.mgmt.managednetworkfabric.models.NetworkRackProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkRacksListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkTap": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapPatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParameters": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRule": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRuleProperties": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapRulesListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkTapsListResult": null, - "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect": null, - "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch": null, - "azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration": null, - "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration": null, - "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectsList": null, - "azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration": null, - "azure.mgmt.managednetworkfabric.models.Operation": null, - "azure.mgmt.managednetworkfabric.models.OperationDisplay": null, - "azure.mgmt.managednetworkfabric.models.OperationListResult": null, - "azure.mgmt.managednetworkfabric.models.OptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.OptionBProperties": null, - "azure.mgmt.managednetworkfabric.models.PortGroupProperties": null, - "azure.mgmt.managednetworkfabric.models.RebootProperties": null, - "azure.mgmt.managednetworkfabric.models.RoutePoliciesListResult": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicy": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyPatch": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyProperties": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties": null, - "azure.mgmt.managednetworkfabric.models.RouteTargetInformation": null, - "azure.mgmt.managednetworkfabric.models.RuleProperties": null, - "azure.mgmt.managednetworkfabric.models.StatementActionProperties": null, - "azure.mgmt.managednetworkfabric.models.StatementConditionProperties": null, - "azure.mgmt.managednetworkfabric.models.StaticRouteProperties": null, - "azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties": null, - "azure.mgmt.managednetworkfabric.models.SupportedVersionProperties": null, - "azure.mgmt.managednetworkfabric.models.SystemData": null, - "azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration": null, - "azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState": null, - "azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState": null, - "azure.mgmt.managednetworkfabric.models.UpdateVersion": null, - "azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties": null, - "azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties": null, - "azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse": null, - "azure.mgmt.managednetworkfabric.models.VlanGroupProperties": null, - "azure.mgmt.managednetworkfabric.models.VlanMatchCondition": null, - "azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties": null, - "azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties": null, - "azure.mgmt.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties": null, - "azure.mgmt.managednetworkfabric.models.SourceDestinationType": null, - "azure.mgmt.managednetworkfabric.models.PrefixType": null, - "azure.mgmt.managednetworkfabric.models.PortType": null, - "azure.mgmt.managednetworkfabric.models.Layer4Protocol": null, - "azure.mgmt.managednetworkfabric.models.AclActionType": null, - "azure.mgmt.managednetworkfabric.models.IPAddressType": null, - "azure.mgmt.managednetworkfabric.models.CreatedByType": null, - "azure.mgmt.managednetworkfabric.models.ConfigurationType": null, - "azure.mgmt.managednetworkfabric.models.CommunityActionTypes": null, - "azure.mgmt.managednetworkfabric.models.ConfigurationState": null, - "azure.mgmt.managednetworkfabric.models.ProvisioningState": null, - "azure.mgmt.managednetworkfabric.models.AdministrativeState": null, - "azure.mgmt.managednetworkfabric.models.GatewayType": null, - "azure.mgmt.managednetworkfabric.models.Action": null, - "azure.mgmt.managednetworkfabric.models.WellKnownCommunities": null, - "azure.mgmt.managednetworkfabric.models.Condition": null, - "azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets": null, - "azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes": null, - "azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled": null, - "azure.mgmt.managednetworkfabric.models.Extension": null, - "azure.mgmt.managednetworkfabric.models.BfdAdministrativeState": null, - "azure.mgmt.managednetworkfabric.models.BooleanEnumProperty": null, - "azure.mgmt.managednetworkfabric.models.AllowASOverride": null, - "azure.mgmt.managednetworkfabric.models.PeeringOption": null, - "azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName": null, - "azure.mgmt.managednetworkfabric.models.NetworkDeviceRole": null, - "azure.mgmt.managednetworkfabric.models.InterfaceType": null, - "azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled": null, - "azure.mgmt.managednetworkfabric.models.NfcSku": null, - "azure.mgmt.managednetworkfabric.models.FabricSkuType": null, - "azure.mgmt.managednetworkfabric.models.NniType": null, - "azure.mgmt.managednetworkfabric.models.IsManagementType": null, - "azure.mgmt.managednetworkfabric.models.NetworkRackType": null, - "azure.mgmt.managednetworkfabric.models.EncapsulationType": null, - "azure.mgmt.managednetworkfabric.models.TapRuleActionType": null, - "azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds": null, - "azure.mgmt.managednetworkfabric.models.DestinationType": null, - "azure.mgmt.managednetworkfabric.models.Encapsulation": null, - "azure.mgmt.managednetworkfabric.models.PollingType": null, - "azure.mgmt.managednetworkfabric.models.Origin": null, - "azure.mgmt.managednetworkfabric.models.ActionType": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType": null, - "azure.mgmt.managednetworkfabric.models.RoutePolicyActionType": null, - "azure.mgmt.managednetworkfabric.models.AddressFamilyType": null, - "azure.mgmt.managednetworkfabric.models.EnableDisableState": null, - "azure.mgmt.managednetworkfabric.models.RebootType": null, - "azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState": null, - "azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction": null, - "azure.mgmt.managednetworkfabric.models.ValidateAction": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.list_by_l3_isolation_domain": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.list_by_l3_isolation_domain": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_reboot": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_reboot": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_refresh_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_refresh_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_upgrade": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_upgrade": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.list_by_network_device": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.list_by_network_device": null, - "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_provision": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_provision": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_deprovision": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_deprovision": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_upgrade": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_upgrade": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_refresh_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_refresh_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_get_topology": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_get_topology": null, - "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_resync": null, - "azure.mgmt.managednetworkfabric.operations.Operations.list": null, - "azure.mgmt.managednetworkfabric.aio.operations.Operations.list": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_create": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.get": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.get": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_delete": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_resource_group": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_subscription": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update_administrative_state": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_validate_configuration": null, - "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_commit_configuration": null, - "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_commit_configuration": null - } + "azure.mgmt.managednetworkfabric.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.managednetworkfabric.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.managednetworkfabric.models.AccessControlList": "Microsoft.ManagedNetworkFabric.AccessControlList", + "azure.mgmt.managednetworkfabric.models.AccessControlListAction": "Microsoft.ManagedNetworkFabric.AccessControlListAction", + "azure.mgmt.managednetworkfabric.models.AccessControlListActionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListActionPatch", + "azure.mgmt.managednetworkfabric.models.CommonMatchConditions": "Microsoft.ManagedNetworkFabric.CommonMatchConditions", + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition": "Microsoft.ManagedNetworkFabric.AccessControlListMatchCondition", + "azure.mgmt.managednetworkfabric.models.CommonMatchConditionsPatch": "Microsoft.ManagedNetworkFabric.CommonMatchConditionsPatch", + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchConditionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConfiguration", + "azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.AccessControlListMatchConfigurationPatch", + "azure.mgmt.managednetworkfabric.models.TagsUpdate": "Microsoft.ManagedNetworkFabric.TagsUpdate", + "azure.mgmt.managednetworkfabric.models.AccessControlListPatch": "Microsoft.ManagedNetworkFabric.AccessControlListPatch", + "azure.mgmt.managednetworkfabric.models.AccessControlListPatchProperties": "Microsoft.ManagedNetworkFabric.AccessControlListPatchProperties", + "azure.mgmt.managednetworkfabric.models.PortCondition": "Microsoft.ManagedNetworkFabric.PortCondition", + "azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition": "Microsoft.ManagedNetworkFabric.AccessControlListPortCondition", + "azure.mgmt.managednetworkfabric.models.PortConditionPatch": "Microsoft.ManagedNetworkFabric.PortConditionPatch", + "azure.mgmt.managednetworkfabric.models.AccessControlListPortConditionPatch": "Microsoft.ManagedNetworkFabric.AccessControlListPortConditionPatch", + "azure.mgmt.managednetworkfabric.models.AccessControlListProperties": "Microsoft.ManagedNetworkFabric.AccessControlListProperties", + "azure.mgmt.managednetworkfabric.models.ActionIpCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.ActionIpCommunityPatchProperties", + "azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties": "Microsoft.ManagedNetworkFabric.ActionIpCommunityProperties", + "azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityPatchProperties", + "azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties": "Microsoft.ManagedNetworkFabric.ActionIpExtendedCommunityProperties", + "azure.mgmt.managednetworkfabric.models.AggregateRoute": "Microsoft.ManagedNetworkFabric.AggregateRoute", + "azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration": "Microsoft.ManagedNetworkFabric.AggregateRouteConfiguration", + "azure.mgmt.managednetworkfabric.models.AggregateRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.AggregateRoutePatchConfiguration", + "azure.mgmt.managednetworkfabric.models.AnnotationResource": "Microsoft.ManagedNetworkFabric.AnnotationResource", + "azure.mgmt.managednetworkfabric.models.ArmConfigurationDiffOperationResponse": "Microsoft.ManagedNetworkFabric.ArmConfigurationDiffOperationResponse", + "azure.mgmt.managednetworkfabric.models.ArmConfigurationDiffResponseProperties": "Microsoft.ManagedNetworkFabric.ArmConfigurationDiffResponseProperties", + "azure.mgmt.managednetworkfabric.models.AuthorizedTransceiverPatchProperties": "Microsoft.ManagedNetworkFabric.AuthorizedTransceiverPatchProperties", + "azure.mgmt.managednetworkfabric.models.AuthorizedTransceiverProperties": "Microsoft.ManagedNetworkFabric.AuthorizedTransceiverProperties", + "azure.mgmt.managednetworkfabric.models.BfdConfiguration": "Microsoft.ManagedNetworkFabric.BfdConfiguration", + "azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration": "Microsoft.ManagedNetworkFabric.BfdPatchConfiguration", + "azure.mgmt.managednetworkfabric.models.BgpConfiguration": "Microsoft.ManagedNetworkFabric.BgpConfiguration", + "azure.mgmt.managednetworkfabric.models.BgpPatchConfiguration": "Microsoft.ManagedNetworkFabric.BgpPatchConfiguration", + "azure.mgmt.managednetworkfabric.models.BitRate": "Microsoft.ManagedNetworkFabric.BitRate", + "azure.mgmt.managednetworkfabric.models.BmpConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.BmpConfigurationPatchProperties", + "azure.mgmt.managednetworkfabric.models.BmpConfigurationProperties": "Microsoft.ManagedNetworkFabric.BmpConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.BmpExportPolicyPatchProperties": "Microsoft.ManagedNetworkFabric.BmpExportPolicyPatchProperties", + "azure.mgmt.managednetworkfabric.models.BmpExportPolicyProperties": "Microsoft.ManagedNetworkFabric.BmpExportPolicyProperties", + "azure.mgmt.managednetworkfabric.models.BurstSize": "Microsoft.ManagedNetworkFabric.BurstSize", + "azure.mgmt.managednetworkfabric.models.CertificateArchiveReference": "Microsoft.ManagedNetworkFabric.CertificateArchiveReference", + "azure.mgmt.managednetworkfabric.models.CertificateRotationStatus": "Microsoft.ManagedNetworkFabric.CertificateRotationStatus", + "azure.mgmt.managednetworkfabric.models.CommitBatchDetails": "Microsoft.ManagedNetworkFabric.CommitBatchDetails", + "azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse": "Microsoft.ManagedNetworkFabric.CommitBatchStatusOperationResponse", + "azure.mgmt.managednetworkfabric.models.CommitBatchStatusRequest": "Microsoft.ManagedNetworkFabric.CommitBatchStatusRequest", + "azure.mgmt.managednetworkfabric.models.CommitBatchStatusResponseProperties": "Microsoft.ManagedNetworkFabric.CommitBatchStatusResponseProperties", + "azure.mgmt.managednetworkfabric.models.CommitConfigurationRequest": "Microsoft.ManagedNetworkFabric.CommitConfigurationRequest", + "azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse": "Microsoft.ManagedNetworkFabric.CommitConfigurationResponse", + "azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration": "Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfiguration", + "azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.CommonDynamicMatchConfigurationPatch", + "azure.mgmt.managednetworkfabric.models.CommonErrorResponse": "Microsoft.ManagedNetworkFabric.CommonErrorResponse", + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommands", + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceROCommandsOperationStatusResult", + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForDeviceUpdate", + "azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate": "Microsoft.ManagedNetworkFabric.CommonPostActionResponseForStateUpdate", + "azure.mgmt.managednetworkfabric.models.ConditionalDefaultRouteProperties": "Microsoft.ManagedNetworkFabric.ConditionalDefaultRouteProperties", + "azure.mgmt.managednetworkfabric.models.ConnectedSubnet": "Microsoft.ManagedNetworkFabric.ConnectedSubnet", + "azure.mgmt.managednetworkfabric.models.ConnectedSubnetPatch": "Microsoft.ManagedNetworkFabric.ConnectedSubnetPatch", + "azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy": "Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicy", + "azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ConnectedSubnetRoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.ControllerServices": "Microsoft.ManagedNetworkFabric.ControllerServices", + "azure.mgmt.managednetworkfabric.models.ControlPlanAclIpMatchCondition": "Microsoft.ManagedNetworkFabric.ControlPlanAclIpMatchCondition", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclAction": "Microsoft.ManagedNetworkFabric.ControlPlaneAclAction", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclActionPatch": "Microsoft.ManagedNetworkFabric.ControlPlaneAclActionPatch", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch": "Microsoft.ManagedNetworkFabric.ControlPlaneAclIpMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchCondition": "Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchCondition", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch": "Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConfigurationPatchProperties", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties": "Microsoft.ManagedNetworkFabric.ControlPlaneAclMatchConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclPatchProperties": "Microsoft.ManagedNetworkFabric.ControlPlaneAclPatchProperties", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortCondition": "Microsoft.ManagedNetworkFabric.ControlPlaneAclPortCondition", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchCondition": "Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchCondition", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch": "Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclProperties": "Microsoft.ManagedNetworkFabric.ControlPlaneAclProperties", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition": "Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchCondition", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch": "Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.DestinationPatchProperties": "Microsoft.ManagedNetworkFabric.DestinationPatchProperties", + "azure.mgmt.managednetworkfabric.models.DestinationProperties": "Microsoft.ManagedNetworkFabric.DestinationProperties", + "azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties": "Microsoft.ManagedNetworkFabric.DeviceInterfaceProperties", + "azure.mgmt.managednetworkfabric.models.DeviceRoCommand": "Microsoft.ManagedNetworkFabric.DeviceRoCommand", + "azure.mgmt.managednetworkfabric.models.DeviceRwCommand": "Microsoft.ManagedNetworkFabric.DeviceRwCommand", + "azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse": "Microsoft.ManagedNetworkFabric.DiscardCommitBatchOperationResponse", + "azure.mgmt.managednetworkfabric.models.DiscardCommitBatchRequest": "Microsoft.ManagedNetworkFabric.DiscardCommitBatchRequest", + "azure.mgmt.managednetworkfabric.models.DiscardCommitBatchResponseProperties": "Microsoft.ManagedNetworkFabric.DiscardCommitBatchResponseProperties", + "azure.mgmt.managednetworkfabric.models.EnableDisableOnResources": "Microsoft.ManagedNetworkFabric.EnableDisableOnResources", + "azure.mgmt.managednetworkfabric.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.managednetworkfabric.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.managednetworkfabric.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicy": "Microsoft.ManagedNetworkFabric.ExportRoutePolicy", + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformation", + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformationPatch": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyInformationPatch", + "azure.mgmt.managednetworkfabric.models.ExportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ExportRoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation": "Microsoft.ManagedNetworkFabric.ExpressRouteConnectionInformation", + "azure.mgmt.managednetworkfabric.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.managednetworkfabric.models.ExternalNetwork": "Microsoft.ManagedNetworkFabric.ExternalNetwork", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkBmpPatchProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkBmpPatchProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkBmpProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkBmpProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatch", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatchProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPatchPropertiesOptionAProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkPropertiesOptionAProperties", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRouteConfiguration", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.ExternalNetworkStaticRoutePatchConfiguration", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateRequest", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties": "Microsoft.ManagedNetworkFabric.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties", + "azure.mgmt.managednetworkfabric.models.FabricLockProperties": "Microsoft.ManagedNetworkFabric.FabricLockProperties", + "azure.mgmt.managednetworkfabric.models.FeatureFlagProperties": "Microsoft.ManagedNetworkFabric.FeatureFlagProperties", + "azure.mgmt.managednetworkfabric.models.GetTopologyResponse": "Microsoft.ManagedNetworkFabric.GetTopologyResponse", + "azure.mgmt.managednetworkfabric.models.GetTopologyResponseProperties": "Microsoft.ManagedNetworkFabric.GetTopologyResponseProperties", + "azure.mgmt.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties": "Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionPatchProperties", + "azure.mgmt.managednetworkfabric.models.GlobalAccessControlListActionProperties": "Microsoft.ManagedNetworkFabric.GlobalAccessControlListActionProperties", + "azure.mgmt.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties": "Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionPatchProperties", + "azure.mgmt.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties": "Microsoft.ManagedNetworkFabric.GlobalNetworkTapRuleActionProperties", + "azure.mgmt.managednetworkfabric.models.HeaderAddressProperties": "Microsoft.ManagedNetworkFabric.HeaderAddressProperties", + "azure.mgmt.managednetworkfabric.models.IcmpConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.IcmpConfigurationPatchProperties", + "azure.mgmt.managednetworkfabric.models.IcmpConfigurationProperties": "Microsoft.ManagedNetworkFabric.IcmpConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.IdentitySelector": "Microsoft.ManagedNetworkFabric.IdentitySelector", + "azure.mgmt.managednetworkfabric.models.IdentitySelectorPatch": "Microsoft.ManagedNetworkFabric.IdentitySelectorPatch", + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicy": "Microsoft.ManagedNetworkFabric.ImportRoutePolicy", + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformation", + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformationPatch": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyInformationPatch", + "azure.mgmt.managednetworkfabric.models.ImportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.ImportRoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.InternalNetwork": "Microsoft.ManagedNetworkFabric.InternalNetwork", + "azure.mgmt.managednetworkfabric.models.InternalNetworkBmpPatchProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkBmpPatchProperties", + "azure.mgmt.managednetworkfabric.models.InternalNetworkBmpProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkBmpProperties", + "azure.mgmt.managednetworkfabric.models.InternalNetworkPatch": "Microsoft.ManagedNetworkFabric.InternalNetworkPatch", + "azure.mgmt.managednetworkfabric.models.InternalNetworkPatchProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkPatchProperties", + "azure.mgmt.managednetworkfabric.models.InternalNetworkProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkProperties", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateRequest", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBfdAdministrativeStateResponseProperties", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateRequest", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties": "Microsoft.ManagedNetworkFabric.InternalNetworkUpdateBgpAdministrativeStateResponseProperties", + "azure.mgmt.managednetworkfabric.models.InternetGateway": "Microsoft.ManagedNetworkFabric.InternetGateway", + "azure.mgmt.managednetworkfabric.models.InternetGatewayPatch": "Microsoft.ManagedNetworkFabric.InternetGatewayPatch", + "azure.mgmt.managednetworkfabric.models.InternetGatewayPatchProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayPatchProperties", + "azure.mgmt.managednetworkfabric.models.InternetGatewayProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayProperties", + "azure.mgmt.managednetworkfabric.models.InternetGatewayRule": "Microsoft.ManagedNetworkFabric.InternetGatewayRule", + "azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch": "Microsoft.ManagedNetworkFabric.InternetGatewayRulePatch", + "azure.mgmt.managednetworkfabric.models.InternetGatewayRuleProperties": "Microsoft.ManagedNetworkFabric.InternetGatewayRuleProperties", + "azure.mgmt.managednetworkfabric.models.IpCommunity": "Microsoft.ManagedNetworkFabric.IpCommunity", + "azure.mgmt.managednetworkfabric.models.IpCommunityIdList": "Microsoft.ManagedNetworkFabric.IpCommunityIdList", + "azure.mgmt.managednetworkfabric.models.IpCommunityPatch": "Microsoft.ManagedNetworkFabric.IpCommunityPatch", + "azure.mgmt.managednetworkfabric.models.IpCommunityPatchableProperties": "Microsoft.ManagedNetworkFabric.IpCommunityPatchableProperties", + "azure.mgmt.managednetworkfabric.models.IpCommunityProperties": "Microsoft.ManagedNetworkFabric.IpCommunityProperties", + "azure.mgmt.managednetworkfabric.models.IpCommunityRule": "Microsoft.ManagedNetworkFabric.IpCommunityRule", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunity": "Microsoft.ManagedNetworkFabric.IpExtendedCommunity", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityIdList", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatch", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchProperties": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityPatchProperties", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityProperties": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityProperties", + "azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule": "Microsoft.ManagedNetworkFabric.IpExtendedCommunityRule", + "azure.mgmt.managednetworkfabric.models.IpGroupPatchProperties": "Microsoft.ManagedNetworkFabric.IpGroupPatchProperties", + "azure.mgmt.managednetworkfabric.models.IpGroupProperties": "Microsoft.ManagedNetworkFabric.IpGroupProperties", + "azure.mgmt.managednetworkfabric.models.IpMatchCondition": "Microsoft.ManagedNetworkFabric.IpMatchCondition", + "azure.mgmt.managednetworkfabric.models.IpMatchConditionPatch": "Microsoft.ManagedNetworkFabric.IpMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.IpPrefix": "Microsoft.ManagedNetworkFabric.IpPrefix", + "azure.mgmt.managednetworkfabric.models.IpPrefixPatch": "Microsoft.ManagedNetworkFabric.IpPrefixPatch", + "azure.mgmt.managednetworkfabric.models.IpPrefixPatchProperties": "Microsoft.ManagedNetworkFabric.IpPrefixPatchProperties", + "azure.mgmt.managednetworkfabric.models.IpPrefixProperties": "Microsoft.ManagedNetworkFabric.IpPrefixProperties", + "azure.mgmt.managednetworkfabric.models.IpPrefixRule": "Microsoft.ManagedNetworkFabric.IpPrefixRule", + "azure.mgmt.managednetworkfabric.models.IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.IsolationDomainPatchProperties", + "azure.mgmt.managednetworkfabric.models.IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.IsolationDomainProperties", + "azure.mgmt.managednetworkfabric.models.L2IsolationDomain": "Microsoft.ManagedNetworkFabric.L2IsolationDomain", + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch": "Microsoft.ManagedNetworkFabric.L2IsolationDomainPatch", + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.L2IsolationDomainPatchProperties", + "azure.mgmt.managednetworkfabric.models.L2IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.L2IsolationDomainProperties", + "azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy": "Microsoft.ManagedNetworkFabric.L3ExportRoutePolicy", + "azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.L3ExportRoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.L3IsolationDomain": "Microsoft.ManagedNetworkFabric.L3IsolationDomain", + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch": "Microsoft.ManagedNetworkFabric.L3IsolationDomainPatch", + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchProperties": "Microsoft.ManagedNetworkFabric.L3IsolationDomainPatchProperties", + "azure.mgmt.managednetworkfabric.models.L3IsolationDomainProperties": "Microsoft.ManagedNetworkFabric.L3IsolationDomainProperties", + "azure.mgmt.managednetworkfabric.models.L3OptionBPatchProperties": "Microsoft.ManagedNetworkFabric.L3OptionBPatchProperties", + "azure.mgmt.managednetworkfabric.models.L3OptionBProperties": "Microsoft.ManagedNetworkFabric.L3OptionBProperties", + "azure.mgmt.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties": "Microsoft.ManagedNetworkFabric.L3UniqueRouteDistinguisherProperties", + "azure.mgmt.managednetworkfabric.models.LastOperationProperties": "Microsoft.ManagedNetworkFabric.LastOperationProperties", + "azure.mgmt.managednetworkfabric.models.Layer2Configuration": "Microsoft.ManagedNetworkFabric.Layer2Configuration", + "azure.mgmt.managednetworkfabric.models.Layer2ConfigurationPatch": "Microsoft.ManagedNetworkFabric.Layer2ConfigurationPatch", + "azure.mgmt.managednetworkfabric.models.Layer3IpPrefixPatchProperties": "Microsoft.ManagedNetworkFabric.Layer3IpPrefixPatchProperties", + "azure.mgmt.managednetworkfabric.models.Layer3IpPrefixProperties": "Microsoft.ManagedNetworkFabric.Layer3IpPrefixProperties", + "azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration": "Microsoft.ManagedNetworkFabric.ManagedResourceGroupConfiguration", + "azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch": "Microsoft.ManagedNetworkFabric.ManagedServiceIdentityPatch", + "azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties": "Microsoft.ManagedNetworkFabric.ManagementNetworkConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.ManagementNetworkPatchConfiguration": "Microsoft.ManagedNetworkFabric.ManagementNetworkPatchConfiguration", + "azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitPatchProperties", + "azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.NativeIpv4PrefixLimitProperties", + "azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitPatchProperties", + "azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.NativeIpv6PrefixLimitProperties", + "azure.mgmt.managednetworkfabric.models.NeighborAddress": "Microsoft.ManagedNetworkFabric.NeighborAddress", + "azure.mgmt.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus": "Microsoft.ManagedNetworkFabric.NeighborAddressBfdAdministrativeStatus", + "azure.mgmt.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus": "Microsoft.ManagedNetworkFabric.NeighborAddressBgpAdministrativeStatus", + "azure.mgmt.managednetworkfabric.models.NeighborAddressPatch": "Microsoft.ManagedNetworkFabric.NeighborAddressPatch", + "azure.mgmt.managednetworkfabric.models.NeighborGroup": "Microsoft.ManagedNetworkFabric.NeighborGroup", + "azure.mgmt.managednetworkfabric.models.NeighborGroupDestination": "Microsoft.ManagedNetworkFabric.NeighborGroupDestination", + "azure.mgmt.managednetworkfabric.models.NeighborGroupDestinationPatch": "Microsoft.ManagedNetworkFabric.NeighborGroupDestinationPatch", + "azure.mgmt.managednetworkfabric.models.NeighborGroupPatch": "Microsoft.ManagedNetworkFabric.NeighborGroupPatch", + "azure.mgmt.managednetworkfabric.models.NeighborGroupPatchProperties": "Microsoft.ManagedNetworkFabric.NeighborGroupPatchProperties", + "azure.mgmt.managednetworkfabric.models.NeighborGroupProperties": "Microsoft.ManagedNetworkFabric.NeighborGroupProperties", + "azure.mgmt.managednetworkfabric.models.NeighborGroupResyncResponse": "Microsoft.ManagedNetworkFabric.NeighborGroupResyncResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevice", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatch": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevicePatch", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevicePatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceProperties": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceProperties", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceRebootResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceRefreshConfigurationResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceResyncPasswordsResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceUpdateAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDeviceUpgradeResponse", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterface", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatch": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfacePatch", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfacePatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfaceProperties": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaceProperties", + "azure.mgmt.managednetworkfabric.models.NetworkDevice": "Microsoft.ManagedNetworkFabric.NetworkDevice", + "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters": "Microsoft.ManagedNetworkFabric.NetworkDevicePatchParameters", + "azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParametersProperties": "Microsoft.ManagedNetworkFabric.NetworkDevicePatchParametersProperties", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceProperties": "Microsoft.ManagedNetworkFabric.NetworkDeviceProperties", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceRefreshConfigurationResponse", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceResyncPasswordsResponse", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceRunRwCommandResponse", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties": "Microsoft.ManagedNetworkFabric.NetworkDeviceRwCommandResponseProperties", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceSku": "Microsoft.ManagedNetworkFabric.NetworkDeviceSku", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceSkuProperties": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkuProperties", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceUpdateAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeRequest": "Microsoft.ManagedNetworkFabric.NetworkDeviceUpgradeRequest", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse": "Microsoft.ManagedNetworkFabric.NetworkDeviceUpgradeResponse", + "azure.mgmt.managednetworkfabric.models.NetworkFabric": "Microsoft.ManagedNetworkFabric.NetworkFabric", + "azure.mgmt.managednetworkfabric.models.NetworkFabricController": "Microsoft.ManagedNetworkFabric.NetworkFabricController", + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatch", + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerPatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkFabricControllerProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricControllerProperties", + "azure.mgmt.managednetworkfabric.models.NetworkFabricLockRequest": "Microsoft.ManagedNetworkFabric.NetworkFabricLockRequest", + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatch": "Microsoft.ManagedNetworkFabric.NetworkFabricPatch", + "azure.mgmt.managednetworkfabric.models.NetworkFabricPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricPatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkFabricProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricProperties", + "azure.mgmt.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricResyncCertificatesResponse", + "azure.mgmt.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricResyncPasswordsResponse", + "azure.mgmt.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricRotateCertificatesResponse", + "azure.mgmt.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse": "Microsoft.ManagedNetworkFabric.NetworkFabricRotatePasswordsResponse", + "azure.mgmt.managednetworkfabric.models.NetworkFabricSku": "Microsoft.ManagedNetworkFabric.NetworkFabricSku", + "azure.mgmt.managednetworkfabric.models.NetworkFabricSkuProperties": "Microsoft.ManagedNetworkFabric.NetworkFabricSkuProperties", + "azure.mgmt.managednetworkfabric.models.NetworkInterface": "Microsoft.ManagedNetworkFabric.NetworkInterface", + "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch": "Microsoft.ManagedNetworkFabric.NetworkInterfacePatch", + "azure.mgmt.managednetworkfabric.models.NetworkInterfacePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkInterfacePatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkInterfaceProperties": "Microsoft.ManagedNetworkFabric.NetworkInterfaceProperties", + "azure.mgmt.managednetworkfabric.models.NetworkMonitor": "Microsoft.ManagedNetworkFabric.NetworkMonitor", + "azure.mgmt.managednetworkfabric.models.NetworkMonitorPatch": "Microsoft.ManagedNetworkFabric.NetworkMonitorPatch", + "azure.mgmt.managednetworkfabric.models.NetworkMonitorPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkMonitorPatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkMonitorProperties": "Microsoft.ManagedNetworkFabric.NetworkMonitorProperties", + "azure.mgmt.managednetworkfabric.models.NetworkPacketBroker": "Microsoft.ManagedNetworkFabric.NetworkPacketBroker", + "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokerPatch", + "azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerProperties": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokerProperties", + "azure.mgmt.managednetworkfabric.models.NetworkRack": "Microsoft.ManagedNetworkFabric.NetworkRack", + "azure.mgmt.managednetworkfabric.models.NetworkRackPatch": "Microsoft.ManagedNetworkFabric.NetworkRackPatch", + "azure.mgmt.managednetworkfabric.models.NetworkRackProperties": "Microsoft.ManagedNetworkFabric.NetworkRackProperties", + "azure.mgmt.managednetworkfabric.models.NetworkTap": "Microsoft.ManagedNetworkFabric.NetworkTap", + "azure.mgmt.managednetworkfabric.models.NetworkTapPatch": "Microsoft.ManagedNetworkFabric.NetworkTapPatch", + "azure.mgmt.managednetworkfabric.models.NetworkTapPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkTapPatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkTapProperties": "Microsoft.ManagedNetworkFabric.NetworkTapProperties", + "azure.mgmt.managednetworkfabric.models.NetworkTapResyncResponse": "Microsoft.ManagedNetworkFabric.NetworkTapResyncResponse", + "azure.mgmt.managednetworkfabric.models.NetworkTapRule": "Microsoft.ManagedNetworkFabric.NetworkTapRule", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction": "Microsoft.ManagedNetworkFabric.NetworkTapRuleAction", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleActionPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleActionPatch", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchCondition", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfiguration", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch": "Microsoft.ManagedNetworkFabric.NetworkTapRuleMatchConfigurationPatch", + "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch": "Microsoft.ManagedNetworkFabric.NetworkTapRulePatch", + "azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchProperties": "Microsoft.ManagedNetworkFabric.NetworkTapRulePatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleProperties": "Microsoft.ManagedNetworkFabric.NetworkTapRuleProperties", + "azure.mgmt.managednetworkfabric.models.NetworkTapRuleResyncResponse": "Microsoft.ManagedNetworkFabric.NetworkTapRuleResyncResponse", + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnect", + "azure.mgmt.managednetworkfabric.models.ProxyResourceBase": "Microsoft.ManagedNetworkFabric.ProxyResourceBase", + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatch", + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectPatchProperties", + "azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectProperties": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnectProperties", + "azure.mgmt.managednetworkfabric.models.NniBmpPatchProperties": "Microsoft.ManagedNetworkFabric.NniBmpPatchProperties", + "azure.mgmt.managednetworkfabric.models.NniBmpProperties": "Microsoft.ManagedNetworkFabric.NniBmpProperties", + "azure.mgmt.managednetworkfabric.models.NniStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.NniStaticRouteConfiguration", + "azure.mgmt.managednetworkfabric.models.NniStaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.NniStaticRoutePatchConfiguration", + "azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest": "Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateRequest", + "azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties": "Microsoft.ManagedNetworkFabric.NniUpdateBfdAdministrativeStateResponseProperties", + "azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.NpbStaticRouteConfiguration", + "azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfigurationPatch": "Microsoft.ManagedNetworkFabric.NpbStaticRouteConfigurationPatch", + "azure.mgmt.managednetworkfabric.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.managednetworkfabric.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.managednetworkfabric.models.OperationStatusResult": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration": "Microsoft.ManagedNetworkFabric.OptionBLayer3Configuration", + "azure.mgmt.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3ConfigurationPatchProperties", + "azure.mgmt.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitPatchProperties", + "azure.mgmt.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.OptionBLayer3PrefixLimitProperties", + "azure.mgmt.managednetworkfabric.models.PoliceRateConfigurationProperties": "Microsoft.ManagedNetworkFabric.PoliceRateConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.PortGroupPatchProperties": "Microsoft.ManagedNetworkFabric.PortGroupPatchProperties", + "azure.mgmt.managednetworkfabric.models.PortGroupProperties": "Microsoft.ManagedNetworkFabric.PortGroupProperties", + "azure.mgmt.managednetworkfabric.models.PrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.PrefixLimitPatchProperties", + "azure.mgmt.managednetworkfabric.models.PrefixLimitProperties": "Microsoft.ManagedNetworkFabric.PrefixLimitProperties", + "azure.mgmt.managednetworkfabric.models.QosPatchProperties": "Microsoft.ManagedNetworkFabric.QosPatchProperties", + "azure.mgmt.managednetworkfabric.models.QosProperties": "Microsoft.ManagedNetworkFabric.QosProperties", + "azure.mgmt.managednetworkfabric.models.RebootProperties": "Microsoft.ManagedNetworkFabric.RebootProperties", + "azure.mgmt.managednetworkfabric.models.RoutePolicy": "Microsoft.ManagedNetworkFabric.RoutePolicy", + "azure.mgmt.managednetworkfabric.models.RoutePolicyPatch": "Microsoft.ManagedNetworkFabric.RoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.RoutePolicyPatchableProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyPatchableProperties", + "azure.mgmt.managednetworkfabric.models.RoutePolicyProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyProperties", + "azure.mgmt.managednetworkfabric.models.RoutePolicyStatementPatchProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyStatementPatchProperties", + "azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties": "Microsoft.ManagedNetworkFabric.RoutePolicyStatementProperties", + "azure.mgmt.managednetworkfabric.models.RoutePrefixLimitPatchProperties": "Microsoft.ManagedNetworkFabric.RoutePrefixLimitPatchProperties", + "azure.mgmt.managednetworkfabric.models.RoutePrefixLimitProperties": "Microsoft.ManagedNetworkFabric.RoutePrefixLimitProperties", + "azure.mgmt.managednetworkfabric.models.RouteTargetInformation": "Microsoft.ManagedNetworkFabric.RouteTargetInformation", + "azure.mgmt.managednetworkfabric.models.RouteTargetPatchInformation": "Microsoft.ManagedNetworkFabric.RouteTargetPatchInformation", + "azure.mgmt.managednetworkfabric.models.RuleProperties": "Microsoft.ManagedNetworkFabric.RuleProperties", + "azure.mgmt.managednetworkfabric.models.SecretArchiveReference": "Microsoft.ManagedNetworkFabric.SecretArchiveReference", + "azure.mgmt.managednetworkfabric.models.SecretRotationStatus": "Microsoft.ManagedNetworkFabric.SecretRotationStatus", + "azure.mgmt.managednetworkfabric.models.SecretRotationSummary": "Microsoft.ManagedNetworkFabric.SecretRotationSummary", + "azure.mgmt.managednetworkfabric.models.StatementActionPatchProperties": "Microsoft.ManagedNetworkFabric.StatementActionPatchProperties", + "azure.mgmt.managednetworkfabric.models.StatementActionProperties": "Microsoft.ManagedNetworkFabric.StatementActionProperties", + "azure.mgmt.managednetworkfabric.models.StatementConditionPatchProperties": "Microsoft.ManagedNetworkFabric.StatementConditionPatchProperties", + "azure.mgmt.managednetworkfabric.models.StatementConditionProperties": "Microsoft.ManagedNetworkFabric.StatementConditionProperties", + "azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration": "Microsoft.ManagedNetworkFabric.StaticRouteConfiguration", + "azure.mgmt.managednetworkfabric.models.StaticRoutePatchConfiguration": "Microsoft.ManagedNetworkFabric.StaticRoutePatchConfiguration", + "azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties": "Microsoft.ManagedNetworkFabric.StaticRoutePatchProperties", + "azure.mgmt.managednetworkfabric.models.StaticRoutePolicy": "Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicy", + "azure.mgmt.managednetworkfabric.models.StaticRoutePolicyPatch": "Microsoft.ManagedNetworkFabric.StaticRouteRoutePolicyPatch", + "azure.mgmt.managednetworkfabric.models.StaticRouteProperties": "Microsoft.ManagedNetworkFabric.StaticRouteProperties", + "azure.mgmt.managednetworkfabric.models.StationConnectionPatchProperties": "Microsoft.ManagedNetworkFabric.StationConnectionPatchProperties", + "azure.mgmt.managednetworkfabric.models.StationConnectionProperties": "Microsoft.ManagedNetworkFabric.StationConnectionProperties", + "azure.mgmt.managednetworkfabric.models.StorageAccountConfiguration": "Microsoft.ManagedNetworkFabric.StorageAccountConfiguration", + "azure.mgmt.managednetworkfabric.models.StorageAccountPatchConfiguration": "Microsoft.ManagedNetworkFabric.StorageAccountPatchConfiguration", + "azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties": "Microsoft.ManagedNetworkFabric.SupportedConnectorProperties", + "azure.mgmt.managednetworkfabric.models.SupportedVersionProperties": "Microsoft.ManagedNetworkFabric.SupportedVersionProperties", + "azure.mgmt.managednetworkfabric.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration": "Microsoft.ManagedNetworkFabric.TerminalServerConfiguration", + "azure.mgmt.managednetworkfabric.models.TerminalServerPatchConfiguration": "Microsoft.ManagedNetworkFabric.TerminalServerPatchConfiguration", + "azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherPatchProperties", + "azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherProperties": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherProperties", + "azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState": "Microsoft.ManagedNetworkFabric.UpdateAdministrativeState", + "azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse": "Microsoft.ManagedNetworkFabric.UpdateAdministrativeStateResponse", + "azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties": "Microsoft.ManagedNetworkFabric.UpdateAdministrativeStateResponseProperties", + "azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState": "Microsoft.ManagedNetworkFabric.UpdateDeviceAdministrativeState", + "azure.mgmt.managednetworkfabric.models.UpdateVersion": "Microsoft.ManagedNetworkFabric.UpdateVersion", + "azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties": "Microsoft.ManagedNetworkFabric.UpgradeNetworkFabricProperties", + "azure.mgmt.managednetworkfabric.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties": "Microsoft.ManagedNetworkFabric.ValidateConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse": "Microsoft.ManagedNetworkFabric.ValidateConfigurationResponse", + "azure.mgmt.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse": "Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationOperationResponse", + "azure.mgmt.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties": "Microsoft.ManagedNetworkFabric.ViewDeviceConfigurationResponseProperties", + "azure.mgmt.managednetworkfabric.models.VlanGroupPatchProperties": "Microsoft.ManagedNetworkFabric.VlanGroupPatchProperties", + "azure.mgmt.managednetworkfabric.models.VlanGroupProperties": "Microsoft.ManagedNetworkFabric.VlanGroupProperties", + "azure.mgmt.managednetworkfabric.models.VlanMatchCondition": "Microsoft.ManagedNetworkFabric.VlanMatchCondition", + "azure.mgmt.managednetworkfabric.models.VlanMatchConditionPatch": "Microsoft.ManagedNetworkFabric.VlanMatchConditionPatch", + "azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties": "Microsoft.ManagedNetworkFabric.VpnConfigurationPatchableProperties", + "azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties": "Microsoft.ManagedNetworkFabric.VpnConfigurationProperties", + "azure.mgmt.managednetworkfabric.models.VpnOptionAPatchProperties": "Microsoft.ManagedNetworkFabric.VpnOptionAPatchProperties", + "azure.mgmt.managednetworkfabric.models.VpnOptionAProperties": "Microsoft.ManagedNetworkFabric.VpnOptionAProperties", + "azure.mgmt.managednetworkfabric.models.VpnOptionBPatchProperties": "Microsoft.ManagedNetworkFabric.VpnOptionBPatchProperties", + "azure.mgmt.managednetworkfabric.models.VpnOptionBProperties": "Microsoft.ManagedNetworkFabric.VpnOptionBProperties", + "azure.mgmt.managednetworkfabric.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.managednetworkfabric.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.managednetworkfabric.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.managednetworkfabric.models.ConfigurationType": "Microsoft.ManagedNetworkFabric.ConfigurationType", + "azure.mgmt.managednetworkfabric.models.CommunityActionTypes": "Microsoft.ManagedNetworkFabric.CommunityActionTypes", + "azure.mgmt.managednetworkfabric.models.IPAddressType": "Microsoft.ManagedNetworkFabric.IPAddressType", + "azure.mgmt.managednetworkfabric.models.SourceDestinationType": "Microsoft.ManagedNetworkFabric.SourceDestinationType", + "azure.mgmt.managednetworkfabric.models.PrefixType": "Microsoft.ManagedNetworkFabric.PrefixType", + "azure.mgmt.managednetworkfabric.models.PortType": "Microsoft.ManagedNetworkFabric.PortType", + "azure.mgmt.managednetworkfabric.models.Layer4Protocol": "Microsoft.ManagedNetworkFabric.Layer4Protocol", + "azure.mgmt.managednetworkfabric.models.AclActionType": "Microsoft.ManagedNetworkFabric.AclActionType", + "azure.mgmt.managednetworkfabric.models.BitRateUnit": "Microsoft.ManagedNetworkFabric.BitRateUnit", + "azure.mgmt.managednetworkfabric.models.BurstSizeUnit": "Microsoft.ManagedNetworkFabric.BurstSizeUnit", + "azure.mgmt.managednetworkfabric.models.AclType": "Microsoft.ManagedNetworkFabric.AclType", + "azure.mgmt.managednetworkfabric.models.DeviceRole": "Microsoft.ManagedNetworkFabric.DeviceRole", + "azure.mgmt.managednetworkfabric.models.BooleanEnumProperty": "Microsoft.ManagedNetworkFabric.BooleanEnumProperty", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchType": "Microsoft.ManagedNetworkFabric.ControlPlaneAclTtlMatchType", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchType": "Microsoft.ManagedNetworkFabric.ControlPlaneAclPortMatchType", + "azure.mgmt.managednetworkfabric.models.ControlPlaneAclActionType": "Microsoft.ManagedNetworkFabric.ControlPlaneAclActionType", + "azure.mgmt.managednetworkfabric.models.ConfigurationState": "Microsoft.ManagedNetworkFabric.ConfigurationState", + "azure.mgmt.managednetworkfabric.models.ProvisioningState": "Microsoft.ManagedNetworkFabric.ProvisioningState", + "azure.mgmt.managednetworkfabric.models.AdministrativeState": "Microsoft.ManagedNetworkFabric.AdministrativeState", + "azure.mgmt.managednetworkfabric.models.EnableDisableState": "Microsoft.ManagedNetworkFabric.EnableDisableState", + "azure.mgmt.managednetworkfabric.models.Action": "Microsoft.ManagedNetworkFabric.Action", + "azure.mgmt.managednetworkfabric.models.RuleCondition": "Microsoft.ManagedNetworkFabric.RuleCondition", + "azure.mgmt.managednetworkfabric.models.GatewayType": "Microsoft.ManagedNetworkFabric.GatewayType", + "azure.mgmt.managednetworkfabric.models.WellKnownCommunities": "Microsoft.ManagedNetworkFabric.WellKnownCommunities", + "azure.mgmt.managednetworkfabric.models.Condition": "Microsoft.ManagedNetworkFabric.Condition", + "azure.mgmt.managednetworkfabric.models.ExtendedVlan": "Microsoft.ManagedNetworkFabric.ExtendedVlan", + "azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets": "Microsoft.ManagedNetworkFabric.RedistributeConnectedSubnets", + "azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes": "Microsoft.ManagedNetworkFabric.RedistributeStaticRoutes", + "azure.mgmt.managednetworkfabric.models.BmpExportPolicy": "Microsoft.ManagedNetworkFabric.BmpExportPolicy", + "azure.mgmt.managednetworkfabric.models.Extension": "Microsoft.ManagedNetworkFabric.Extension", + "azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled": "Microsoft.ManagedNetworkFabric.IsMonitoringEnabled", + "azure.mgmt.managednetworkfabric.models.BfdAdministrativeState": "Microsoft.ManagedNetworkFabric.BfdAdministrativeState", + "azure.mgmt.managednetworkfabric.models.AllowASOverride": "Microsoft.ManagedNetworkFabric.AllowASOverride", + "azure.mgmt.managednetworkfabric.models.BgpAdministrativeState": "Microsoft.ManagedNetworkFabric.BgpAdministrativeState", + "azure.mgmt.managednetworkfabric.models.BmpConfigurationState": "Microsoft.ManagedNetworkFabric.BmpConfigurationState", + "azure.mgmt.managednetworkfabric.models.V4OverV6BgpSessionState": "Microsoft.ManagedNetworkFabric.V4OverV6BgpSessionState", + "azure.mgmt.managednetworkfabric.models.V6OverV4BgpSessionState": "Microsoft.ManagedNetworkFabric.V6OverV4BgpSessionState", + "azure.mgmt.managednetworkfabric.models.InternalNetworkRouteType": "Microsoft.ManagedNetworkFabric.InternalNetworkRouteType", + "azure.mgmt.managednetworkfabric.models.PeeringOption": "Microsoft.ManagedNetworkFabric.PeeringOption", + "azure.mgmt.managednetworkfabric.models.ExternalNetworkRouteType": "Microsoft.ManagedNetworkFabric.ExternalNetworkRouteType", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName": "Microsoft.ManagedNetworkFabric.NetworkDeviceRoleName", + "azure.mgmt.managednetworkfabric.models.ManagedServiceIdentitySelectorType": "Microsoft.ManagedNetworkFabric.ManagedServiceIdentitySelectorType", + "azure.mgmt.managednetworkfabric.models.NetworkDeviceRole": "Microsoft.ManagedNetworkFabric.NetworkDeviceRole", + "azure.mgmt.managednetworkfabric.models.SynchronizationStatus": "Microsoft.ManagedNetworkFabric.SynchronizationStatus", + "azure.mgmt.managednetworkfabric.models.RebootType": "Microsoft.ManagedNetworkFabric.RebootType", + "azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState": "Microsoft.ManagedNetworkFabric.DeviceAdministrativeState", + "azure.mgmt.managednetworkfabric.models.InterfaceType": "Microsoft.ManagedNetworkFabric.InterfaceType", + "azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled": "Microsoft.ManagedNetworkFabric.IsWorkloadManagementNetworkEnabled", + "azure.mgmt.managednetworkfabric.models.NfcSku": "Microsoft.ManagedNetworkFabric.NfcSku", + "azure.mgmt.managednetworkfabric.models.FabricSkuType": "Microsoft.ManagedNetworkFabric.FabricSkuType", + "azure.mgmt.managednetworkfabric.models.LockConfigurationState": "Microsoft.ManagedNetworkFabric.LockConfigurationState", + "azure.mgmt.managednetworkfabric.models.NetworkFabricLockType": "Microsoft.ManagedNetworkFabric.NetworkFabricLockType", + "azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState": "Microsoft.ManagedNetworkFabric.UniqueRouteDistinguisherConfigurationState", + "azure.mgmt.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState": "Microsoft.ManagedNetworkFabric.NNIDerivedUniqueRouteDistinguisherConfigurationState", + "azure.mgmt.managednetworkfabric.models.QosConfigurationState": "Microsoft.ManagedNetworkFabric.QosConfigurationState", + "azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction": "Microsoft.ManagedNetworkFabric.NetworkFabricUpgradeAction", + "azure.mgmt.managednetworkfabric.models.ValidateAction": "Microsoft.ManagedNetworkFabric.ValidateAction", + "azure.mgmt.managednetworkfabric.models.CommitStage": "Microsoft.ManagedNetworkFabric.CommitStage", + "azure.mgmt.managednetworkfabric.models.CommitConfigurationPolicy": "Microsoft.ManagedNetworkFabric.CommitConfigurationPolicy", + "azure.mgmt.managednetworkfabric.models.CommitBatchState": "Microsoft.ManagedNetworkFabric.CommitBatchState", + "azure.mgmt.managednetworkfabric.models.NetworkFabricLockAction": "Microsoft.ManagedNetworkFabric.NetworkFabricLockAction", + "azure.mgmt.managednetworkfabric.models.NniType": "Microsoft.ManagedNetworkFabric.NniType", + "azure.mgmt.managednetworkfabric.models.IsManagementType": "Microsoft.ManagedNetworkFabric.IsManagementType", + "azure.mgmt.managednetworkfabric.models.MicroBfdState": "Microsoft.ManagedNetworkFabric.MicroBfdState", + "azure.mgmt.managednetworkfabric.models.RouteType": "Microsoft.ManagedNetworkFabric.RouteType", + "azure.mgmt.managednetworkfabric.models.NetworkRackType": "Microsoft.ManagedNetworkFabric.NetworkRackType", + "azure.mgmt.managednetworkfabric.models.EncapsulationType": "Microsoft.ManagedNetworkFabric.EncapsulationType", + "azure.mgmt.managednetworkfabric.models.TapRuleActionType": "Microsoft.ManagedNetworkFabric.TapRuleActionType", + "azure.mgmt.managednetworkfabric.models.DestinationType": "Microsoft.ManagedNetworkFabric.DestinationType", + "azure.mgmt.managednetworkfabric.models.Encapsulation": "Microsoft.ManagedNetworkFabric.Encapsulation", + "azure.mgmt.managednetworkfabric.models.PollingType": "Microsoft.ManagedNetworkFabric.PollingType", + "azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType": "Microsoft.ManagedNetworkFabric.RoutePolicyConditionType", + "azure.mgmt.managednetworkfabric.models.RoutePolicyActionType": "Microsoft.ManagedNetworkFabric.RoutePolicyActionType", + "azure.mgmt.managednetworkfabric.models.AddressFamilyType": "Microsoft.ManagedNetworkFabric.AddressFamilyType", + "azure.mgmt.managednetworkfabric.models.StationConfigurationState": "Microsoft.ManagedNetworkFabric.StationConfigurationState", + "azure.mgmt.managednetworkfabric.models.StationConnectionMode": "Microsoft.ManagedNetworkFabric.StationConnectionMode", + "azure.mgmt.managednetworkfabric.models.BmpMonitoredAddressFamily": "Microsoft.ManagedNetworkFabric.BmpMonitoredAddressFamily", + "azure.mgmt.managednetworkfabric.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.managednetworkfabric.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.get": "Microsoft.ManagedNetworkFabric.AccessControlLists.get", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.get": "Microsoft.ManagedNetworkFabric.AccessControlLists.get", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_create": "Microsoft.ManagedNetworkFabric.AccessControlLists.create", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_create": "Microsoft.ManagedNetworkFabric.AccessControlLists.create", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update": "Microsoft.ManagedNetworkFabric.AccessControlLists.update", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update": "Microsoft.ManagedNetworkFabric.AccessControlLists.update", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.AccessControlLists.delete", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.AccessControlLists.delete", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.AccessControlLists.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.AccessControlLists.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.AccessControlLists.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.AccessControlLists.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.AccessControlLists.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.AccessControlLists.resync", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.AccessControlLists.resync", + "azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.AccessControlLists.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.get": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.get", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.get": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.get", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.create", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.create", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.update", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.update", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.delete", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.InternetGatewayRules.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.get": "Microsoft.ManagedNetworkFabric.InternetGateways.get", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.get": "Microsoft.ManagedNetworkFabric.InternetGateways.get", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternetGateways.create", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternetGateways.create", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternetGateways.update", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternetGateways.update", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternetGateways.delete", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternetGateways.delete", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.InternetGateways.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.InternetGateways.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.InternetGateways.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.InternetGateways.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.get": "Microsoft.ManagedNetworkFabric.IpCommunities.get", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.get": "Microsoft.ManagedNetworkFabric.IpCommunities.get", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpCommunities.create", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpCommunities.create", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpCommunities.update", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpCommunities.update", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpCommunities.delete", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpCommunities.delete", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpCommunities.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpCommunities.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpCommunities.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpCommunities.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.get": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.get": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.get", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.create", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.update", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.delete", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.IpExtendedCommunitiesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.IpExtendedCommunitiesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpExtendedCommunities.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.get": "Microsoft.ManagedNetworkFabric.IpPrefixes.get", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.get": "Microsoft.ManagedNetworkFabric.IpPrefixes.get", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpPrefixes.create", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_create": "Microsoft.ManagedNetworkFabric.IpPrefixes.create", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpPrefixes.update", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_update": "Microsoft.ManagedNetworkFabric.IpPrefixes.update", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpPrefixes.delete", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.IpPrefixes.delete", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpPrefixes.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.IpPrefixes.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.IpPrefixesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpPrefixes.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.IpPrefixesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.IpPrefixes.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.get": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.get", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.get": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.get", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_create": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.create", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_create": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.create", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.update", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.update", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.delete", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.L2IsolationDomainsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.L2IsolationDomainsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.L2IsolationDomains.commitConfiguration", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.get": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.get", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.get": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.get", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_create": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.create", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_create": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.create", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.update", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.update", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.delete", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.L3IsolationDomainsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.L3IsolationDomainsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.L3IsolationDomains.commitConfiguration", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.get": "Microsoft.ManagedNetworkFabric.InternalNetworks.get", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.get": "Microsoft.ManagedNetworkFabric.InternalNetworks.get", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternalNetworks.create", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_create": "Microsoft.ManagedNetworkFabric.InternalNetworks.create", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternalNetworks.update", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update": "Microsoft.ManagedNetworkFabric.InternalNetworks.update", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternalNetworks.delete", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.InternalNetworks.delete", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.list_by_l3_isolation_domain": "Microsoft.ManagedNetworkFabric.InternalNetworks.listByL3IsolationDomain", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.list_by_l3_isolation_domain": "Microsoft.ManagedNetworkFabric.InternalNetworks.listByL3IsolationDomain", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_bgp_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBgpAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.InternalNetworksOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.InternalNetworksOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.InternalNetworks.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.get": "Microsoft.ManagedNetworkFabric.ExternalNetworks.get", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.get": "Microsoft.ManagedNetworkFabric.ExternalNetworks.get", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_create": "Microsoft.ManagedNetworkFabric.ExternalNetworks.create", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_create": "Microsoft.ManagedNetworkFabric.ExternalNetworks.create", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update": "Microsoft.ManagedNetworkFabric.ExternalNetworks.update", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update": "Microsoft.ManagedNetworkFabric.ExternalNetworks.update", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.ExternalNetworks.delete", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.ExternalNetworks.delete", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": "Microsoft.ManagedNetworkFabric.ExternalNetworks.listByL3IsolationDomain", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.list_by_l3_isolation_domain": "Microsoft.ManagedNetworkFabric.ExternalNetworks.listByL3IsolationDomain", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.ExternalNetworksOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.ExternalNetworksOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.ExternalNetworks.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.get": "Microsoft.ManagedNetworkFabric.NeighborGroups.get", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.get": "Microsoft.ManagedNetworkFabric.NeighborGroups.get", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NeighborGroups.create", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NeighborGroups.create", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NeighborGroups.update", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NeighborGroups.update", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NeighborGroups.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NeighborGroups.delete", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NeighborGroups.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NeighborGroups.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NeighborGroups.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NeighborGroups.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NeighborGroupsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NeighborGroups.resync", + "azure.mgmt.managednetworkfabric.aio.operations.NeighborGroupsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NeighborGroups.resync", + "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.get": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.get": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.get", + "azure.mgmt.managednetworkfabric.operations.NetworkDeviceSkusOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDeviceSkusOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkDeviceSkus.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkDevices.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkDevices.get", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkDevices.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkDevices.create", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkDevices.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkDevices.update", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkDevices.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkDevices.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkDevices.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkDevices.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkDevices.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkDevices.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_reboot": "Microsoft.ManagedNetworkFabric.NetworkDevices.reboot", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_reboot": "Microsoft.ManagedNetworkFabric.NetworkDevices.reboot", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkDevices.refreshConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkDevices.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkDevices.upgrade", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_run_ro_command": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_run_ro_command": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRoCommand", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_run_rw_command": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_run_rw_command": "Microsoft.ManagedNetworkFabric.NetworkDevices.runRwCommand", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkDevices.resyncPasswords", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkDevices.resyncPasswords", + "azure.mgmt.managednetworkfabric.operations.NetworkDevicesOperations.begin_resync_certificates": "Microsoft.ManagedNetworkFabric.NetworkDevices.resyncCertificates", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkDevicesOperations.begin_resync_certificates": "Microsoft.ManagedNetworkFabric.NetworkDevices.resyncCertificates", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.get", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.create", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.update", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.list_by_network_device": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.listByNetworkDevice", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.list_by_network_device": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.listByNetworkDevice", + "azure.mgmt.managednetworkfabric.operations.NetworkInterfacesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkInterfacesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkInterfaces.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.get", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.create", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.update", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricControllersOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricControllersOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabricControllers.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.get", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricSkusOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricSkusOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabricSkus.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabrics.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkFabrics.get", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkFabrics.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkFabrics.create", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkFabrics.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkFabrics.update", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkFabrics.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkFabrics.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkFabrics.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_provision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.provision", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_provision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.provision", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_deprovision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_deprovision": "Microsoft.ManagedNetworkFabric.NetworkFabrics.deprovision", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkFabrics.upgrade", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.refreshConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_workload_management_bfd_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateWorkloadManagementBfdConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_update_infra_management_bfd_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.updateInfraManagementBfdConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_get_topology": "Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_get_topology": "Microsoft.ManagedNetworkFabric.NetworkFabrics.getTopology", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_commit_batch_status": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_commit_batch_status": "Microsoft.ManagedNetworkFabric.NetworkFabrics.commitBatchStatus", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_discard_commit_batch": "Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_discard_commit_batch": "Microsoft.ManagedNetworkFabric.NetworkFabrics.discardCommitBatch", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_lock_fabric": "Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_lock_fabric": "Microsoft.ManagedNetworkFabric.NetworkFabrics.lockFabric", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_view_device_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_view_device_configuration": "Microsoft.ManagedNetworkFabric.NetworkFabrics.viewDeviceConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_arm_configuration_diff": "Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_arm_configuration_diff": "Microsoft.ManagedNetworkFabric.NetworkFabrics.armConfigurationDiff", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_rotate_passwords": "Microsoft.ManagedNetworkFabric.NetworkFabrics.rotatePasswords", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_rotate_passwords": "Microsoft.ManagedNetworkFabric.NetworkFabrics.rotatePasswords", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncPasswords", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncPasswords", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_rotate_certificates": "Microsoft.ManagedNetworkFabric.NetworkFabrics.rotateCertificates", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_rotate_certificates": "Microsoft.ManagedNetworkFabric.NetworkFabrics.rotateCertificates", + "azure.mgmt.managednetworkfabric.operations.NetworkFabricsOperations.begin_resync_certificates": "Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncCertificates", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkFabricsOperations.begin_resync_certificates": "Microsoft.ManagedNetworkFabric.NetworkFabrics.resyncCertificates", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.get", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.create", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.update", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.listByNetworkFabric", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.list_by_network_fabric": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.listByNetworkFabric", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateNpbStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateNpbStaticRouteBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkToNetworkInterconnectsOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkToNetworkInterconnectsOperations.begin_update_bfd_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkToNetworkInterconnects.updateBfdAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.get": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.get": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.get", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.create", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.update", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkPacketBrokersOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkPacketBrokersOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkPacketBrokers.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.get": "Microsoft.ManagedNetworkFabric.NetworkRacks.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.get": "Microsoft.ManagedNetworkFabric.NetworkRacks.get", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkRacks.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkRacks.create", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkRacks.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkRacks.update", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkRacks.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkRacks.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkRacks.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkRacks.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkRacksOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkRacks.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkRacksOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkRacks.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkTapRules.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkTapRules.get", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkTapRules.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkTapRules.create", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkTapRules.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkTapRules.update", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkTapRules.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkTapRules.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkTapRules.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkTapRules.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NetworkTapRules.resync", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NetworkTapRules.resync", + "azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.NetworkTapRules.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkTaps.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkTaps.get", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkTaps.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkTaps.create", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkTaps.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkTaps.update", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkTaps.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkTaps.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkTaps.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkTaps.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkTaps.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkTaps.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkTaps.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NetworkTaps.resync", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations.begin_resync": "Microsoft.ManagedNetworkFabric.NetworkTaps.resync", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.get": "Microsoft.ManagedNetworkFabric.RoutePolicies.get", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.get": "Microsoft.ManagedNetworkFabric.RoutePolicies.get", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_create": "Microsoft.ManagedNetworkFabric.RoutePolicies.create", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_create": "Microsoft.ManagedNetworkFabric.RoutePolicies.create", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update": "Microsoft.ManagedNetworkFabric.RoutePolicies.update", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update": "Microsoft.ManagedNetworkFabric.RoutePolicies.update", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.RoutePolicies.delete", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.RoutePolicies.delete", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.RoutePolicies.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.RoutePolicies.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.RoutePolicies.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.RoutePolicies.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.RoutePolicies.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_validate_configuration": "Microsoft.ManagedNetworkFabric.RoutePolicies.validateConfiguration", + "azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations.begin_commit_configuration": "Microsoft.ManagedNetworkFabric.RoutePolicies.commitConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkMonitors.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.get": "Microsoft.ManagedNetworkFabric.NetworkMonitors.get", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkMonitors.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkMonitors.create", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkMonitors.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkMonitors.update", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkMonitors.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkMonitors.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkMonitors.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkMonitors.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.get", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.create", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.update", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listByResourceGroup", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.list_by_resource_group": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listByResourceGroup", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listBySubscription", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.list_by_subscription": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.listBySubscription", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_reboot": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.reboot", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_reboot": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.reboot", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.refreshConfiguration", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_refresh_configuration": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.refreshConfiguration", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.upgrade", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_upgrade": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.upgrade", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.resyncPasswords", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations.begin_resync_passwords": "Microsoft.ManagedNetworkFabric.NetworkBootstrapDevices.resyncPasswords", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.get", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.get": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.get", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.create", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.begin_create": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.create", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.update", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.begin_update": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.update", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.delete", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.begin_delete": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.delete", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.list_by_network_bootstrap_device": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.listByNetworkBootstrapDevice", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.list_by_network_bootstrap_device": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.listByNetworkBootstrapDevice", + "azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.updateAdministrativeState", + "azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations.begin_update_administrative_state": "Microsoft.ManagedNetworkFabric.NetworkBootstrapInterfaces.updateAdministrativeState" + }, + "CrossLanguageVersion": "5cacf28a7da5" } \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py index 039152ec12da..894b711c2c55 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient # type: ignore +from ._client import ManagedNetworkFabricMgmtClient # type: ignore from ._version import VERSION __version__ = VERSION diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_client.py similarity index 84% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_client.py index c0e231aa1757..29ee0b1ebef5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_managed_network_fabric_mgmt_client.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import ManagedNetworkFabricMgmtClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( @@ -32,12 +31,15 @@ L2IsolationDomainsOperations, L3IsolationDomainsOperations, NeighborGroupsOperations, + NetworkBootstrapDevicesOperations, + NetworkBootstrapInterfacesOperations, NetworkDeviceSkusOperations, NetworkDevicesOperations, NetworkFabricControllersOperations, NetworkFabricSkusOperations, NetworkFabricsOperations, NetworkInterfacesOperations, + NetworkMonitorsOperations, NetworkPacketBrokersOperations, NetworkRacksOperations, NetworkTapRulesOperations, @@ -47,6 +49,11 @@ RoutePoliciesOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -55,15 +62,17 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attributes """Self service experience for Azure Network Fabric API. + :ivar operations: Operations operations + :vartype operations: azure.mgmt.managednetworkfabric.operations.Operations :ivar access_control_lists: AccessControlListsOperations operations :vartype access_control_lists: azure.mgmt.managednetworkfabric.operations.AccessControlListsOperations - :ivar internet_gateways: InternetGatewaysOperations operations - :vartype internet_gateways: - azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations :ivar internet_gateway_rules: InternetGatewayRulesOperations operations :vartype internet_gateway_rules: azure.mgmt.managednetworkfabric.operations.InternetGatewayRulesOperations + :ivar internet_gateways: InternetGatewaysOperations operations + :vartype internet_gateways: + azure.mgmt.managednetworkfabric.operations.InternetGatewaysOperations :ivar ip_communities: IpCommunitiesOperations operations :vartype ip_communities: azure.mgmt.managednetworkfabric.operations.IpCommunitiesOperations :ivar ip_extended_communities: IpExtendedCommunitiesOperations operations @@ -114,21 +123,28 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attri azure.mgmt.managednetworkfabric.operations.NetworkTapRulesOperations :ivar network_taps: NetworkTapsOperations operations :vartype network_taps: azure.mgmt.managednetworkfabric.operations.NetworkTapsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.managednetworkfabric.operations.Operations :ivar route_policies: RoutePoliciesOperations operations :vartype route_policies: azure.mgmt.managednetworkfabric.operations.RoutePoliciesOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar network_monitors: NetworkMonitorsOperations operations + :vartype network_monitors: azure.mgmt.managednetworkfabric.operations.NetworkMonitorsOperations + :ivar network_bootstrap_devices: NetworkBootstrapDevicesOperations operations + :vartype network_bootstrap_devices: + azure.mgmt.managednetworkfabric.operations.NetworkBootstrapDevicesOperations + :ivar network_bootstrap_interfaces: NetworkBootstrapInterfacesOperations operations + :vartype network_bootstrap_interfaces: + azure.mgmt.managednetworkfabric.operations.NetworkBootstrapInterfacesOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-07-15" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -143,6 +159,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -151,6 +168,7 @@ def __init__( self._config = ManagedNetworkFabricMgmtClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -174,19 +192,19 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.access_control_lists = AccessControlListsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internet_gateways = InternetGatewaysOperations( + self.internet_gateway_rules = InternetGatewayRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internet_gateway_rules = InternetGatewayRulesOperations( + self.internet_gateways = InternetGatewaysOperations( self._client, self._config, self._serialize, self._deserialize ) self.ip_communities = IpCommunitiesOperations(self._client, self._config, self._serialize, self._deserialize) @@ -232,16 +250,24 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.network_taps = NetworkTapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.route_policies = RoutePoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_monitors = NetworkMonitorsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.network_bootstrap_devices = NetworkBootstrapDevicesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.network_bootstrap_interfaces = NetworkBootstrapInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -254,7 +280,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py index 3cfd8a22bc9b..e99188143c80 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class ManagedNetworkFabricMgmtClientConfiguration: # pylint: disable=too-many-i Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-07-15" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,10 +43,11 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2023-06-15") + api_version: str = kwargs.pop("api_version", "2025-07-15") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/model_base.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/model_base.py new file mode 100644 index 000000000000..d725c55906d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/model_base.py @@ -0,0 +1,1737 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +from azure.core.rest import HttpResponse + +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +# ============================================================================ +# Fast-path scalar deserializer functions for rest_field(deserializer=...) +# These are referenced from rest_field declarations to bypass the generic +# _deserialize -> _deserialize_with_callable chain. +# Only simple/primitive types — no models or container types. +# ============================================================================ + + +def _xml_deser_str(value): + if isinstance(value, ET.Element): + return value.text or "" + return str(value) if value is not None else None + + +def _xml_deser_int(value): + if isinstance(value, ET.Element): + return int(value.text) if value.text else None + return int(value) if value is not None else None + + +def _xml_deser_float(value): + if isinstance(value, ET.Element): + return float(value.text) if value.text else None + return float(value) if value is not None else None + + +def _xml_deser_bool(value): + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + if text in (True, False): + return text + return text.lower() == "true" + + +# pylint: disable=docstring-missing-param +def _xml_deser_bytes(value): + """Deserialize bytes from XML (base64).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes(text) + + +def _xml_deser_bytes_base64url(value): + """Deserialize bytes from XML (base64url).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes_base64(text) + + +def _xml_deser_datetime(value): + """Deserialize a datetime from XML (ISO 8601 / rfc3339).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime(text) + + +def _xml_deser_datetime_rfc7231(value): + """Deserialize a datetime from XML (RFC7231 format).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_rfc7231(text) + + +def _xml_deser_datetime_unix_timestamp(value): + """Deserialize a datetime from XML (Unix timestamp).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_unix_timestamp(float(text)) + + +def _xml_deser_date(value): + """Deserialize a date from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_date(text) + + +def _xml_deser_time(value): + """Deserialize a time from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_time(text) + + +def _xml_deser_duration(value): + """Deserialize a timedelta from XML (ISO 8601 duration).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_duration(text) + + +def _xml_deser_decimal(value): + """Deserialize a Decimal from XML.""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_decimal(text) + + +def _xml_deser_enum_or_str(enum_cls, value): + """Deserialize a Union[EnumType, str] from XML.""" + text = value.text if isinstance(value, ET.Element) else value + if text is None: + return None + try: + return enum_cls(text) + except ValueError: + return text + + +def _extract_xml_model_type(rf_type): + """Extract the concrete Model class from a resolved rf._type partial chain. + + Unwraps ``Optional[Model]`` and ``_deserialize_model(Model, ...)`` + wrappers. Only handles Model and Optional[Model] — other composite + types (List, Dict, Union, etc.) return None and fall through to the + generic ``_deserialize`` path at runtime. + """ + if rf_type is None: + return None + if isinstance(rf_type, type) and _is_model(rf_type): + return rf_type + if not isinstance(rf_type, functools.partial): + return None + func = rf_type.func + args = rf_type.args + if func is _deserialize_with_optional and args: + return _extract_xml_model_type(args[0]) + if func is _deserialize_model and args: + cls = args[0] + return cls if isinstance(cls, type) and _is_model(cls) else None + return None + + +def _build_xml_field_plan( # pylint: disable=docstring-missing-return, docstring-missing-rtype, unused-variable + cls, attr_to_rest_field: dict +) -> list: + """Build a precomputed XML field plan for fast _init_from_xml iteration. + + Called once per model class in __new__. Returns a list of tuples: + (rest_name, xml_name, kind, deser, rf_type, is_optional, items_name) + + kind: 0=wrapped, 1=attribute, 2=unwrapped, 3=text + + For Model and Optional[Model] fields that lack a scalar + ``_deserializer``, this function precomputes the Model class as the + deserializer so ``_init_from_xml`` can call ``ModelClass(element)`` + directly instead of going through the expensive + ``_get_deserialize_callable_from_annotation`` chain at runtime. + """ + model_meta = getattr(cls, "_xml", {}) + model_ns = model_meta.get("ns") or model_meta.get("namespace") + plan = [] + + for rf in attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + deser = rf._deserializer + + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + is_optional = rf._is_optional + + # For Model / Optional[Model] fields without a scalar deserializer, + # precompute the Model class as the deserializer. + if deser is None and rf._type is not None: + model_cls = _extract_xml_model_type(rf._type) + if model_cls is not None: + deser = model_cls + + if prop_meta.get("attribute", False): + plan.append((rf._rest_name, xml_name, 1, deser, rf._type, is_optional, None)) + elif prop_meta.get("unwrapped", False): + items_name = prop_meta.get("itemsName") + if items_name: + items_ns = prop_meta.get("itemsNs") + if items_ns is not None: + xml_ns = items_ns + if xml_ns: + items_name = "{" + xml_ns + "}" + items_name + else: + items_name = xml_name + plan.append((rf._rest_name, xml_name, 2, deser, rf._type, is_optional, items_name)) + elif prop_meta.get("text", False): + plan.append((rf._rest_name, xml_name, 3, deser, rf._type, is_optional, None)) + else: + plan.append((rf._rest_name, xml_name, 0, deser, rf._type, is_optional, None)) + + return plan + + +# pylint: enable=docstring-missing-param +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass: dict[str, typing.Any] = {} + if args: + if isinstance(args[0], ET.Element): + dict_to_pass.update(self._init_from_xml(args[0])) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) + super().__init__(dict_to_pass) + + def _init_from_xml( # pylint: disable=too-many-branches, too-many-statements + self, element: ET.Element + ) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + existed_attr_keys: list[str] = [] + + field_plan = getattr(self, "_xml_field_plan", None) + if field_plan: + for rest_name, xml_name, kind, deser, rf_type, is_optional, items_name in field_plan: + if kind == 0: # wrapped element (most common) + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(item) + else: + result[rest_name] = _deserialize(rf_type, item) + elif kind == 1: # attribute + attr_val = element.get(xml_name) + if attr_val is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(attr_val) + else: + result[rest_name] = attr_val + elif kind == 2: # unwrapped array + items = element.findall(items_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(items_name) + if deser: + result[rest_name] = deser(items) + else: + result[rest_name] = _deserialize(rf_type, items) + elif not is_optional: + existed_attr_keys.append(items_name) + result[rest_name] = [] + elif kind == 3: # text + if element.text is not None: + if deser: + result[rest_name] = deser(element.text) + else: + result[rest_name] = element.text + else: + model_meta = getattr(self, "_xml", {}) + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + # Build XML field plan for fast _init_from_xml (only for XML models) + if getattr(cls, "_xml", None): + cls._xml_field_plan = _build_xml_field_plan(cls, attr_to_rest_field) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + self._deserializer = deserializer + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + # Fast path: use _deserializer directly (avoids _serialize/_deserialize chain) + if self._deserializer: + deserialized = self._deserializer(item) + else: + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + deserializer=deserializer, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) + wrapped_element = _create_xml_element( + element_name, + model_meta.get("prefix"), + _model_ns, + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + _set_xml_attribute(wrapped_element, k, v, prop_meta) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": _dict_ns, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": _items_ns, + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + if _is_model(deserializer): + return deserializer._deserialize(element, []) + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py index 6da830e0cf4a..a088671e9c51 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] @@ -1401,7 +1405,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: # Otherwise, result are unexpected self.additional_properties_detection = True - def __call__(self, target_obj, response_data, content_type=None): + def __call__(self, target_obj, response_data, content_type=None): # pylint: disable=too-many-return-statements """Call the deserializer to process a REST response. :param str target_obj: Target data type to deserialize to. @@ -1411,6 +1415,27 @@ def __call__(self, target_obj, response_data, content_type=None): :return: Deserialized object. :rtype: object """ + # Fast path for header deserialization: response_data is a plain str or None + # and target_obj is a simple scalar type. This avoids the expensive + # _unpack_content → _deserialize → _classify_target → deserialize_data chain. + if response_data is None: + return None + if target_obj == "str" and isinstance(response_data, str): + return response_data + if isinstance(response_data, str): + if target_obj == "int": + return int(response_data) + if target_obj == "bool": + if response_data in ("true", "1", "True"): + return True + if response_data in ("false", "0", "False"): + return False + return bool(response_data) + if target_obj == "rfc-1123": + return Deserializer.deserialize_rfc(response_data) + if target_obj == "bytearray": + return Deserializer.deserialize_bytearray(response_data) + data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_validation.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_validation.py new file mode 100644 index 000000000000..f5af3a4eb8a2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_validation.py @@ -0,0 +1,66 @@ +# -------------------------------------------------------------------------- +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools + + +def api_version_validation(**kwargs): + params_added_on = kwargs.pop("params_added_on", {}) + method_added_on = kwargs.pop("method_added_on", "") + api_versions_list = kwargs.pop("api_versions_list", []) + + def _index_with_default(value: str, default: int = -1) -> int: + """Get the index of value in lst, or return default if not found. + + :param value: The value to search for in the api_versions_list. + :type value: str + :param default: The default value to return if the value is not found. + :type default: int + :return: The index of the value in the list, or the default value if not found. + :rtype: int + """ + try: + return api_versions_list.index(value) + except ValueError: + return default + + def decorator(func): + @functools.wraps(func) + def wrapper(*args, **kwargs): + try: + # this assumes the client has an _api_version attribute + client = args[0] + client_api_version = client._config.api_version # pylint: disable=protected-access + except AttributeError: + return func(*args, **kwargs) + + if _index_with_default(method_added_on) > _index_with_default(client_api_version): + raise ValueError( + f"'{func.__name__}' is not available in API version " + f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." + ) + + unsupported = { + parameter: api_version + for api_version, parameters in params_added_on.items() + for parameter in parameters + if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version) + } + if unsupported: + raise ValueError( + "".join( + [ + f"'{param}' is not available in API version {client_api_version}. " + f"Use service API version {version} or newer.\n" + for param, version in unsupported.items() + ] + ) + ) + return func(*args, **kwargs) + + return wrapper + + return decorator diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py index aed7748bad79..ed0855dea5e6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/_version.py @@ -2,9 +2,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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- - VERSION = "1.1.0" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py index 075be0377845..3da428c83335 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._managed_network_fabric_mgmt_client import ManagedNetworkFabricMgmtClient # type: ignore +from ._client import ManagedNetworkFabricMgmtClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_client.py similarity index 85% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_client.py index 6fc79ccf6d5a..f4c52886ae27 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_managed_network_fabric_mgmt_client.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_client.py @@ -2,13 +2,13 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ManagedNetworkFabricMgmtClientConfiguration from .operations import ( @@ -32,12 +31,15 @@ L2IsolationDomainsOperations, L3IsolationDomainsOperations, NeighborGroupsOperations, + NetworkBootstrapDevicesOperations, + NetworkBootstrapInterfacesOperations, NetworkDeviceSkusOperations, NetworkDevicesOperations, NetworkFabricControllersOperations, NetworkFabricSkusOperations, NetworkFabricsOperations, NetworkInterfacesOperations, + NetworkMonitorsOperations, NetworkPacketBrokersOperations, NetworkRacksOperations, NetworkTapRulesOperations, @@ -47,6 +49,11 @@ RoutePoliciesOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -55,15 +62,17 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attributes """Self service experience for Azure Network Fabric API. + :ivar operations: Operations operations + :vartype operations: azure.mgmt.managednetworkfabric.aio.operations.Operations :ivar access_control_lists: AccessControlListsOperations operations :vartype access_control_lists: azure.mgmt.managednetworkfabric.aio.operations.AccessControlListsOperations - :ivar internet_gateways: InternetGatewaysOperations operations - :vartype internet_gateways: - azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations :ivar internet_gateway_rules: InternetGatewayRulesOperations operations :vartype internet_gateway_rules: azure.mgmt.managednetworkfabric.aio.operations.InternetGatewayRulesOperations + :ivar internet_gateways: InternetGatewaysOperations operations + :vartype internet_gateways: + azure.mgmt.managednetworkfabric.aio.operations.InternetGatewaysOperations :ivar ip_communities: IpCommunitiesOperations operations :vartype ip_communities: azure.mgmt.managednetworkfabric.aio.operations.IpCommunitiesOperations :ivar ip_extended_communities: IpExtendedCommunitiesOperations operations @@ -117,21 +126,29 @@ class ManagedNetworkFabricMgmtClient: # pylint: disable=too-many-instance-attri azure.mgmt.managednetworkfabric.aio.operations.NetworkTapRulesOperations :ivar network_taps: NetworkTapsOperations operations :vartype network_taps: azure.mgmt.managednetworkfabric.aio.operations.NetworkTapsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.managednetworkfabric.aio.operations.Operations :ivar route_policies: RoutePoliciesOperations operations :vartype route_policies: azure.mgmt.managednetworkfabric.aio.operations.RoutePoliciesOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar network_monitors: NetworkMonitorsOperations operations + :vartype network_monitors: + azure.mgmt.managednetworkfabric.aio.operations.NetworkMonitorsOperations + :ivar network_bootstrap_devices: NetworkBootstrapDevicesOperations operations + :vartype network_bootstrap_devices: + azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapDevicesOperations + :ivar network_bootstrap_interfaces: NetworkBootstrapInterfacesOperations operations + :vartype network_bootstrap_interfaces: + azure.mgmt.managednetworkfabric.aio.operations.NetworkBootstrapInterfacesOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-07-15" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -146,6 +163,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -154,6 +172,7 @@ def __init__( self._config = ManagedNetworkFabricMgmtClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -178,20 +197,20 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.access_control_lists = AccessControlListsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internet_gateways = InternetGatewaysOperations( + self.internet_gateway_rules = InternetGatewayRulesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internet_gateway_rules = InternetGatewayRulesOperations( + self.internet_gateways = InternetGatewaysOperations( self._client, self._config, self._serialize, self._deserialize ) self.ip_communities = IpCommunitiesOperations(self._client, self._config, self._serialize, self._deserialize) @@ -237,10 +256,18 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.network_taps = NetworkTapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.route_policies = RoutePoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_monitors = NetworkMonitorsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.network_bootstrap_devices = NetworkBootstrapDevicesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.network_bootstrap_interfaces = NetworkBootstrapInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -248,7 +275,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -261,7 +288,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py index 9e8b36baf35c..ac4dde250d4e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class ManagedNetworkFabricMgmtClientConfiguration: # pylint: disable=too-many-i Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2023-06-15". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2025-07-15" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,10 +43,11 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2023-06-15") + api_version: str = kwargs.pop("api_version", "2025-07-15") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py index 4a911a89fb9a..6f98a0dd5ad0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,39 +12,43 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._access_control_lists_operations import AccessControlListsOperations # type: ignore -from ._internet_gateways_operations import InternetGatewaysOperations # type: ignore -from ._internet_gateway_rules_operations import InternetGatewayRulesOperations # type: ignore -from ._ip_communities_operations import IpCommunitiesOperations # type: ignore -from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations # type: ignore -from ._ip_prefixes_operations import IpPrefixesOperations # type: ignore -from ._l2_isolation_domains_operations import L2IsolationDomainsOperations # type: ignore -from ._l3_isolation_domains_operations import L3IsolationDomainsOperations # type: ignore -from ._internal_networks_operations import InternalNetworksOperations # type: ignore -from ._external_networks_operations import ExternalNetworksOperations # type: ignore -from ._neighbor_groups_operations import NeighborGroupsOperations # type: ignore -from ._network_device_skus_operations import NetworkDeviceSkusOperations # type: ignore -from ._network_devices_operations import NetworkDevicesOperations # type: ignore -from ._network_interfaces_operations import NetworkInterfacesOperations # type: ignore -from ._network_fabric_controllers_operations import NetworkFabricControllersOperations # type: ignore -from ._network_fabric_skus_operations import NetworkFabricSkusOperations # type: ignore -from ._network_fabrics_operations import NetworkFabricsOperations # type: ignore -from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations # type: ignore -from ._network_packet_brokers_operations import NetworkPacketBrokersOperations # type: ignore -from ._network_racks_operations import NetworkRacksOperations # type: ignore -from ._network_tap_rules_operations import NetworkTapRulesOperations # type: ignore -from ._network_taps_operations import NetworkTapsOperations # type: ignore from ._operations import Operations # type: ignore -from ._route_policies_operations import RoutePoliciesOperations # type: ignore +from ._operations import AccessControlListsOperations # type: ignore +from ._operations import InternetGatewayRulesOperations # type: ignore +from ._operations import InternetGatewaysOperations # type: ignore +from ._operations import IpCommunitiesOperations # type: ignore +from ._operations import IpExtendedCommunitiesOperations # type: ignore +from ._operations import IpPrefixesOperations # type: ignore +from ._operations import L2IsolationDomainsOperations # type: ignore +from ._operations import L3IsolationDomainsOperations # type: ignore +from ._operations import InternalNetworksOperations # type: ignore +from ._operations import ExternalNetworksOperations # type: ignore +from ._operations import NeighborGroupsOperations # type: ignore +from ._operations import NetworkDeviceSkusOperations # type: ignore +from ._operations import NetworkDevicesOperations # type: ignore +from ._operations import NetworkInterfacesOperations # type: ignore +from ._operations import NetworkFabricControllersOperations # type: ignore +from ._operations import NetworkFabricSkusOperations # type: ignore +from ._operations import NetworkFabricsOperations # type: ignore +from ._operations import NetworkToNetworkInterconnectsOperations # type: ignore +from ._operations import NetworkPacketBrokersOperations # type: ignore +from ._operations import NetworkRacksOperations # type: ignore +from ._operations import NetworkTapRulesOperations # type: ignore +from ._operations import NetworkTapsOperations # type: ignore +from ._operations import RoutePoliciesOperations # type: ignore +from ._operations import NetworkMonitorsOperations # type: ignore +from ._operations import NetworkBootstrapDevicesOperations # type: ignore +from ._operations import NetworkBootstrapInterfacesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "Operations", "AccessControlListsOperations", - "InternetGatewaysOperations", "InternetGatewayRulesOperations", + "InternetGatewaysOperations", "IpCommunitiesOperations", "IpExtendedCommunitiesOperations", "IpPrefixesOperations", @@ -64,8 +68,10 @@ "NetworkRacksOperations", "NetworkTapRulesOperations", "NetworkTapsOperations", - "Operations", "RoutePoliciesOperations", + "NetworkMonitorsOperations", + "NetworkBootstrapDevicesOperations", + "NetworkBootstrapInterfacesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py deleted file mode 100644 index d95787cfb41f..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_access_control_lists_operations.py +++ /dev/null @@ -1,1304 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._access_control_lists_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_resync_request, - build_update_administrative_state_request, - build_update_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class AccessControlListsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`access_control_lists` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlList, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "AccessControlList") - - _request = build_create_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.AccessControlList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlList, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Is either a AccessControlList type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AccessControlList].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AccessControlList]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> _models.AccessControlList: - """Gets a Access Control List. - - Implements Access Control List GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: AccessControlList or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "AccessControlListPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.AccessControlListPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Is either a AccessControlListPatch type - or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AccessControlList].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AccessControlList]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Access Control List. - - Implements Access Control List DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.AccessControlList"]: - """List AccessControlLists by resource group. - - Implements AccessControlLists list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either AccessControlList or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.AccessControlList"]: - """List AccessControlLists by subscription. - - Implements AccessControlLists list by subscription GET method. - - :return: An iterator like instance of either AccessControlList or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _resync_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_resync( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync operation on the Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._resync_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_validate_configuration( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py deleted file mode 100644 index a9046d7dba18..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_external_networks_operations.py +++ /dev/null @@ -1,1236 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._external_networks_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_l3_isolation_domain_request, - build_update_administrative_state_request, - build_update_request, - build_update_static_route_bfd_administrative_state_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ExternalNetworksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`external_networks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetwork, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ExternalNetwork") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.ExternalNetwork, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetwork, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a ExternalNetwork type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ExternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> _models.ExternalNetwork: - """Retrieves details of ExternalNetwork. - - Implements ExternalNetworks GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :return: ExternalNetwork or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ExternalNetworkPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.ExternalNetworkPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Is either a - ExternalNetworkPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ExternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a ExternalNetworks. - - Implements ExternalNetworks DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_l3_isolation_domain( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ExternalNetwork"]: - """Executes list operation to display External Networks within an isolation domain. - - Implements External Networks list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An iterator like instance of either ExternalNetwork or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExternalNetworksList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_l3_isolation_domain_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ExternalNetworksList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py deleted file mode 100644 index 105c7d0498c8..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internal_networks_operations.py +++ /dev/null @@ -1,1460 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._internal_networks_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_l3_isolation_domain_request, - build_update_administrative_state_request, - build_update_bgp_administrative_state_request, - build_update_request, - build_update_static_route_bfd_administrative_state_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class InternalNetworksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`internal_networks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetwork, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternalNetwork") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.InternalNetwork, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetwork, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a InternalNetwork type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> _models.InternalNetwork: - """Retrieves details of InternalNetworks using GET method. - - Gets a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :return: InternalNetwork or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternalNetworkPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.InternalNetworkPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Is either a - InternalNetworkPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a InternalNetworks. - - Implements InternalNetworks DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_l3_isolation_domain( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.InternalNetwork"]: - """Executes list operation to display list of all internal networks. - - Displays InternalNetworks list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An iterator like instance of either InternalNetwork or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternalNetworksList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_l3_isolation_domain_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("InternalNetworksList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_bgp_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_bgp_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_bgp_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py deleted file mode 100644 index 6e9399f9e859..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateway_rules_operations.py +++ /dev/null @@ -1,845 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._internet_gateway_rules_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class InternetGatewayRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`internet_gateway_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayRule") - - _request = build_create_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: _models.InternetGatewayRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Is either a InternetGatewayRule type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternetGatewayRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> _models.InternetGatewayRule: - """Gets an Internet Gateway Rule. - - Gets an Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :return: InternetGatewayRule or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayRulePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: _models.InternetGatewayRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Is either a InternetGatewayRulePatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternetGatewayRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an Internet Gateway Rule. - - Implements Internet Gateway Rules DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.InternetGatewayRule"]: - """List Internet Gateway Rules by resource group. - - Implements Internet Gateway Rules list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGatewayRule"]: - """List Internet Gateway Rules by subscription. - - List all Internet Gateway rules in the given subscription. - - :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py deleted file mode 100644 index fa5f5e245710..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_internet_gateways_operations.py +++ /dev/null @@ -1,836 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._internet_gateways_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class InternetGatewaysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`internet_gateways` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGateway, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGateway") - - _request = build_create_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: _models.InternetGateway, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGateway, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Is either a InternetGateway type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternetGateway].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternetGateway]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: - """Retrieves details of Network Fabric Service Internet Gateway. - - Implements Gateway GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :return: InternetGateway or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: _models.InternetGatewayPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - InternetGatewayPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.InternetGateway].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.InternetGateway]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Fabric Service Internet Gateway. - - Execute a delete on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.InternetGateway"]: - """List Internet Gateways by resource group. - - Displays Internet Gateways list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either InternetGateway or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGateway"]: - """List Internet Gateways by subscription. - - Displays Internet Gateways list by subscription GET method. - - :return: An iterator like instance of either InternetGateway or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py deleted file mode 100644 index 96e892b481c2..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_communities_operations.py +++ /dev/null @@ -1,834 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._ip_communities_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IpCommunitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_communities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunity, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpCommunity") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: _models.IpCommunity, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunity, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Is either a IpCommunity type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: - """Gets an IP Community. - - Implements an IP Community GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :return: IpCommunity or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpCommunityPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: _models.IpCommunityPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Is either a IpCommunityPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, ip_community_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, ip_community_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an IP Community. - - Implements IP Community DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: - """List IP Communities by resource group. - - Implements IP Communities list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpCommunity or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: - """List IP Communities by subscription. - - Implements IP Communities list by subscription GET method. - - :return: An iterator like instance of either IpCommunity or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py deleted file mode 100644 index 48c65cf87e82..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_extended_communities_operations.py +++ /dev/null @@ -1,845 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._ip_extended_communities_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IpExtendedCommunitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_extended_communities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpExtendedCommunity") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: _models.IpExtendedCommunity, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Is either a IpExtendedCommunity type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpExtendedCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> _models.IpExtendedCommunity: - """Gets an IP Extended Community. - - Implements IP Extended Community GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :return: IpExtendedCommunity or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpExtendedCommunityPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: _models.IpExtendedCommunityPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Is either a IpExtendedCommunityPatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpExtendedCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the IP Extended Community. - - Implements IP Extended Community DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IpExtendedCommunity"]: - """List IpExtendedCommunities by resource group. - - Implements IpExtendedCommunities list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpExtendedCommunity"]: - """List IpExtendedCommunities by subscription. - - Implements IpExtendedCommunities list by subscription GET method. - - :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py deleted file mode 100644 index 7ec80b84dd52..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_ip_prefixes_operations.py +++ /dev/null @@ -1,824 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._ip_prefixes_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IpPrefixesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_prefixes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpPrefix") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_prefix_name: str, - body: _models.IpPrefix, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - ip_prefix_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Is either a IpPrefix type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpPrefix].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpPrefix]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: - """Gets an IP Prefix. - - Implements IP Prefix GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :return: IpPrefix or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - ip_prefix_name: str, - body: Union[_models.IpPrefixPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpPrefixPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: _models.IpPrefixPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: Union[_models.IpPrefixPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IpPrefix or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IpPrefix].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IpPrefix]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes the IP Prefix. - - Implements IP Prefix DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: - """List IpPrefixes by resource group. - - Implements IpPrefixes list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpPrefix or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: - """List IpPrefixes by subscription. - - Implements IpPrefixes list by subscription GET method. - - :return: An iterator like instance of either IpPrefix or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py deleted file mode 100644 index cb9f1787cccc..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l2_isolation_domains_operations.py +++ /dev/null @@ -1,1294 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._l2_isolation_domains_operations import ( - build_commit_configuration_request, - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_administrative_state_request, - build_update_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class L2IsolationDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`l2_isolation_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L2IsolationDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.L2IsolationDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Is either a L2IsolationDomain type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO[bytes] - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.L2IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> _models.L2IsolationDomain: - """Retrieves details of this L2 Isolation Domain. - - Implements L2 Isolation Domain GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: L2IsolationDomain or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L2IsolationDomainPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.L2IsolationDomainPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - L2IsolationDomainPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.L2IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the L2 Isolation Domain. - - Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_validate_configuration( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _commit_configuration_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_commit_configuration( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._commit_configuration_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.L2IsolationDomain"]: - """List L2IsolationDomains by resource group. - - Displays L2IsolationDomains list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L2IsolationDomain"]: - """List L2IsolationDomains by subscription. - - Displays L2IsolationDomains list by subscription GET method. - - :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py deleted file mode 100644 index 4333fc8854bd..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_l3_isolation_domains_operations.py +++ /dev/null @@ -1,1297 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._l3_isolation_domains_operations import ( - build_commit_configuration_request, - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_administrative_state_request, - build_update_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class L3IsolationDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`l3_isolation_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L3IsolationDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.L3IsolationDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Is either a L3IsolationDomain type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO[bytes] - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.L3IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> _models.L3IsolationDomain: - """Gets a L3 Isolation Domain. - - Retrieves details of this L3 Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: L3IsolationDomain or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L3IsolationDomainPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.L3IsolationDomainPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Is either a - L3IsolationDomainPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.L3IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a L3 Isolation Domain. - - Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.L3IsolationDomain"]: - """List L3IsolationDomains by resource group. - - Displays L3IsolationDomains list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L3IsolationDomain"]: - """List L3IsolationDomains by subscription. - - Displays L3IsolationDomains list by subscription GET method. - - :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_validate_configuration( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _commit_configuration_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_commit_configuration( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._commit_configuration_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py deleted file mode 100644 index de8733f32b2f..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_neighbor_groups_operations.py +++ /dev/null @@ -1,830 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._neighbor_groups_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NeighborGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`neighbor_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NeighborGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: _models.NeighborGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroup, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Is either a NeighborGroup type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NeighborGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: - """Retrieves details of neighbor Group using GET method. - - Gets the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :return: NeighborGroup or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NeighborGroupPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: _models.NeighborGroupPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Is either a - NeighborGroupPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NeighborGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Neighbor Group. - - Implements Neighbor Group DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NeighborGroup"]: - """List Neighbor Groups by resource group. - - Displays NeighborGroups list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NeighborGroup or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NeighborGroup"]: - """List Neighbor Groups by subscription. - - Displays NeighborGroups list by subscription GET method. - - :return: An iterator like instance of either NeighborGroup or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py deleted file mode 100644 index 798ad0a2d767..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_device_skus_operations.py +++ /dev/null @@ -1,196 +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 collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_device_skus_operations import build_get_request, build_list_by_subscription_request -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkDeviceSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_device_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: - """Gets a Network Device Sku. - - Get a Network Device SKU details. - - :param network_device_sku_name: Name of the Network Device SKU. Required. - :type network_device_sku_name: str - :return: NetworkDeviceSku or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) - - _request = build_get_request( - network_device_sku_name=network_device_sku_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkDeviceSku", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDeviceSku"]: - """List Network Device SKUs by subscription. - - List Network Device SKUs for the given subscription. - - :return: An iterator like instance of either NetworkDeviceSku or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDeviceSkusListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDeviceSkusListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py deleted file mode 100644 index abfdb5beb0bd..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_devices_operations.py +++ /dev/null @@ -1,1590 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_devices_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_reboot_request, - build_refresh_configuration_request, - build_update_administrative_state_request, - build_update_request, - build_upgrade_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkDevicesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_devices` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevice, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkDevice") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: _models.NetworkDevice, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevice, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a NetworkDevice type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: - """Gets a Network Device. - - Gets the Network Device resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: NetworkDevice or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkDevicePatchParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: _models.NetworkDevicePatchParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Is either a NetworkDevicePatchParameters type - or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Device. - - Delete the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkDevice"]: - """List NetworkDevices by resource group. - - List all the Network Device resources in a given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkDevice or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDevice"]: - """List NetworkDevices by subscription. - - List all the Network Device resources in a given subscription. - - :return: An iterator like instance of either NetworkDevice or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _reboot_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.RebootProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RebootProperties") - - _request = build_reboot_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: _models.RebootProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.RebootProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a RebootProperties type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._reboot_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _refresh_configuration_initial( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_configuration_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_configuration( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Refreshes the configuration the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_configuration_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateDeviceAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: _models.UpdateDeviceAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _upgrade_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateVersion, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateVersion") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: _models.UpdateVersion, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateVersion, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a UpdateVersion type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._upgrade_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py deleted file mode 100644 index 8bb3987d7d9c..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_controllers_operations.py +++ /dev/null @@ -1,839 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_fabric_controllers_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkFabricControllersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabric_controllers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricController") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: _models.NetworkFabricController, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Is either a NetworkFabricController type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkFabricController]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> _models.NetworkFabricController: - """Gets a Network Fabric Controller. - - Shows the provisioning status of Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :return: NetworkFabricController or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricControllerPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: _models.NetworkFabricControllerPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Is either a - NetworkFabricControllerPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkFabricController or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkFabricController]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Fabric Controller. - - Deletes the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkFabricController"]: - """List NetworkFabricControllers by resource group. - - Lists all the NetworkFabricControllers thats available in the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricController"]: - """List NetworkFabricControllers by subscription. - - Lists all the NetworkFabricControllers by subscription. - - :return: An iterator like instance of either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py deleted file mode 100644 index 0d9be7140112..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabric_skus_operations.py +++ /dev/null @@ -1,196 +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 collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_fabric_skus_operations import build_get_request, build_list_by_subscription_request -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkFabricSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabric_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: - """Gets a Network Fabric Sku. - - Implements Network Fabric SKU GET method. - - :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. - :type network_fabric_sku_name: str - :return: NetworkFabricSku or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) - - _request = build_get_request( - network_fabric_sku_name=network_fabric_sku_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabricSku", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricSku"]: - """List Network Fabric SKUs by subscription. - - Implements Network Fabric SKUs list by subscription GET method. - - :return: An iterator like instance of either NetworkFabricSku or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricSkusListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricSkusListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py deleted file mode 100644 index f527596484fc..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_fabrics_operations.py +++ /dev/null @@ -1,2317 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_fabrics_operations import ( - build_commit_configuration_request, - build_create_request, - build_delete_request, - build_deprovision_request, - build_get_request, - build_get_topology_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_provision_request, - build_refresh_configuration_request, - build_update_infra_management_bfd_configuration_request, - build_update_request, - build_update_workload_management_bfd_configuration_request, - build_upgrade_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkFabricsOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabrics` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabric, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabric") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.NetworkFabric, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabric, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a NetworkFabric type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkFabric]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: - """Gets a Network Fabric. - - Get Network Fabric resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: NetworkFabric or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.NetworkFabricPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkFabric]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Fabric. - - Delete Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkFabric"]: - """List Network Fabrics by resource group. - - List all the Network Fabric resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkFabric or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabric"]: - """List Network Fabrics by subscription. - - List all the Network Fabric resources in the given subscription. - - :return: An iterator like instance of either NetworkFabric or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _provision_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_provision_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_provision( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Provisions the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._provision_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _deprovision_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_deprovision_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_deprovision( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Deprovisions the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._deprovision_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _upgrade_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpgradeNetworkFabricProperties") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpgradeNetworkFabricProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a UpgradeNetworkFabricProperties - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._upgrade_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _refresh_configuration_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh_configuration( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Refreshes the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_workload_management_bfd_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_workload_management_bfd_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_infra_management_bfd_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_infra_management_bfd_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ValidateConfigurationProperties") - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.ValidateConfigurationProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Is either a ValidateConfigurationProperties - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _get_topology_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_topology_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_get_topology( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Gets Topology of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._get_topology_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _commit_configuration_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_commit_configuration( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric - level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._commit_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py deleted file mode 100644 index d6ebee0ec662..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_interfaces_operations.py +++ /dev/null @@ -1,1009 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_interfaces_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_network_device_request, - build_update_administrative_state_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkInterfacesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_interfaces` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterface, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkInterface") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.NetworkInterface, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterface, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Is either a NetworkInterface type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkInterface]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> _models.NetworkInterface: - """Gets a NetworkInterface. - - Get the Network Interface resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :return: NetworkInterface or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkInterfacePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.NetworkInterfacePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Is either a - NetworkInterfacePatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkInterface]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a NetworkInterface. - - Delete the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_network_device( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkInterface"]: - """List all Network Interfaces that are available using an Network Device. - - List all the Network Interface resources in a given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An iterator like instance of either NetworkInterface or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkInterfacesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_network_device_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfacesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py deleted file mode 100644 index 6843f04414ee..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_packet_brokers_operations.py +++ /dev/null @@ -1,833 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_packet_brokers_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkPacketBrokersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_packet_brokers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkPacketBroker") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: _models.NetworkPacketBroker, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Is either a NetworkPacketBroker type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkPacketBroker]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> _models.NetworkPacketBroker: - """Gets a Network Packet Broker. - - Retrieves details of this Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :return: NetworkPacketBroker or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkPacketBrokerPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: _models.NetworkPacketBrokerPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Is either a NetworkPacketBrokerPatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkPacketBroker]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Packet Broker. - - Deletes Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkPacketBroker"]: - """List all Network Packet Brokers under resource group. - - Displays NetworkPacketBrokers list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkPacketBroker"]: - """List Network Packet Brokers by subscription. - - Displays Network Packet Brokers list by subscription GET method. - - :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py deleted file mode 100644 index ae848360c582..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_racks_operations.py +++ /dev/null @@ -1,822 +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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_racks_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkRacksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_racks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.NetworkRack, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkRack") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: _models.NetworkRack, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.NetworkRack, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Is either a NetworkRack type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkRack].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkRack]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: - """Gets a Network Rack. - - Get Network Rack resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :return: NetworkRack or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.TagsUpdate, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "TagsUpdate") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: _models.TagsUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.TagsUpdate, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkRack].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkRack]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_rack_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_rack_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Rack. - - Delete Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: - """List Network Racks by resource group. - - List all Network Rack resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkRack or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: - """List Network Racks by subscription. - - List all Network Rack resources in the given subscription. - - :return: An iterator like instance of either NetworkRack or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py deleted file mode 100644 index 335d72964d58..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_tap_rules_operations.py +++ /dev/null @@ -1,1301 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_tap_rules_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_resync_request, - build_update_administrative_state_request, - build_update_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkTapRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_tap_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapRule") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.NetworkTapRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Is either a NetworkTapRule type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkTapRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: - """Gets a Network Tap Rule. - - Get Network Tap Rule resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: NetworkTapRule or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapRulePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.NetworkTapRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Is either a NetworkTapRulePatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkTapRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Tap Rule. - - Delete Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkTapRule"]: - """List Network Tap Rules by resource group. - - List all the Network Tap Rule resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkTapRule or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTapRule"]: - """List NetworkTapRules by subscription. - - List all the Network Tap Rule resources in the given subscription. - - :return: An iterator like instance of either NetworkTapRule or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _resync_initial( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_resync( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync the Network Tap Rule. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._resync_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_validate_configuration( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the Network Tap Rule. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py deleted file mode 100644 index e33eb8f444bd..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_taps_operations.py +++ /dev/null @@ -1,1151 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_taps_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_resync_request, - build_update_administrative_state_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkTapsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_taps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTap") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.NetworkTap, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Is either a NetworkTap type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkTap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkTap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: - """Gets a Network Tap. - - Retrieves details of this Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: NetworkTap or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.NetworkTapPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.NetworkTapPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.NetworkTapPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkTap or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkTap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkTap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Network Tap. - - Deletes Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: - """List Network Taps by resource group. - - Displays Network Taps list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkTap or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: - """List Network Taps by subscription. - - Displays Network Taps list by subscription GET method. - - :return: An iterator like instance of either NetworkTap or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _resync_initial( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_resync( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync operation on the Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._resync_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py deleted file mode 100644 index 39030e97d851..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_network_to_network_interconnects_operations.py +++ /dev/null @@ -1,1262 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._network_to_network_interconnects_operations import ( - build_create_request, - build_delete_request, - build_get_request, - build_list_by_network_fabric_request, - build_update_administrative_state_request, - build_update_npb_static_route_bfd_administrative_state_request, - build_update_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class NetworkToNetworkInterconnectsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`network_to_network_interconnects` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkToNetworkInterconnect") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.NetworkToNetworkInterconnect, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> _models.NetworkToNetworkInterconnect: - """Configuration used to setup CE-PE connectivity. - - Implements NetworkToNetworkInterconnects GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :return: NetworkToNetworkInterconnect or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkToNetworkInterconnectPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.NetworkToNetworkInterconnectPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Is either a - NetworkToNetworkInterconnectPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a NetworkToNetworkInterconnects. - - Implements NetworkToNetworkInterconnects DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_network_fabric( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.NetworkToNetworkInterconnect"]: - """Executes list operation to display Network To Network Interconnects within a Network Fabric. - - Implements Network To Network Interconnects list by Network Fabric GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An iterator like instance of either NetworkToNetworkInterconnect or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkToNetworkInterconnectsList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_network_fabric_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnectsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_npb_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_npb_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py index 2defbcbb22e5..b23860006d19 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_operations.py @@ -1,12 +1,15 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -17,21 +20,236 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_list_request +from ..._validation import api_version_validation +from ...operations._operations import ( + build_access_control_lists_create_request, + build_access_control_lists_delete_request, + build_access_control_lists_get_request, + build_access_control_lists_list_by_resource_group_request, + build_access_control_lists_list_by_subscription_request, + build_access_control_lists_resync_request, + build_access_control_lists_update_administrative_state_request, + build_access_control_lists_update_request, + build_access_control_lists_validate_configuration_request, + build_external_networks_create_request, + build_external_networks_delete_request, + build_external_networks_get_request, + build_external_networks_list_by_l3_isolation_domain_request, + build_external_networks_update_administrative_state_request, + build_external_networks_update_bfd_administrative_state_request, + build_external_networks_update_request, + build_external_networks_update_static_route_bfd_administrative_state_request, + build_internal_networks_create_request, + build_internal_networks_delete_request, + build_internal_networks_get_request, + build_internal_networks_list_by_l3_isolation_domain_request, + build_internal_networks_update_administrative_state_request, + build_internal_networks_update_bfd_administrative_state_request, + build_internal_networks_update_bgp_administrative_state_request, + build_internal_networks_update_request, + build_internal_networks_update_static_route_bfd_administrative_state_request, + build_internet_gateway_rules_create_request, + build_internet_gateway_rules_delete_request, + build_internet_gateway_rules_get_request, + build_internet_gateway_rules_list_by_resource_group_request, + build_internet_gateway_rules_list_by_subscription_request, + build_internet_gateway_rules_update_request, + build_internet_gateways_create_request, + build_internet_gateways_delete_request, + build_internet_gateways_get_request, + build_internet_gateways_list_by_resource_group_request, + build_internet_gateways_list_by_subscription_request, + build_internet_gateways_update_request, + build_ip_communities_create_request, + build_ip_communities_delete_request, + build_ip_communities_get_request, + build_ip_communities_list_by_resource_group_request, + build_ip_communities_list_by_subscription_request, + build_ip_communities_update_request, + build_ip_extended_communities_create_request, + build_ip_extended_communities_delete_request, + build_ip_extended_communities_get_request, + build_ip_extended_communities_list_by_resource_group_request, + build_ip_extended_communities_list_by_subscription_request, + build_ip_extended_communities_update_request, + build_ip_prefixes_create_request, + build_ip_prefixes_delete_request, + build_ip_prefixes_get_request, + build_ip_prefixes_list_by_resource_group_request, + build_ip_prefixes_list_by_subscription_request, + build_ip_prefixes_update_request, + build_l2_isolation_domains_commit_configuration_request, + build_l2_isolation_domains_create_request, + build_l2_isolation_domains_delete_request, + build_l2_isolation_domains_get_request, + build_l2_isolation_domains_list_by_resource_group_request, + build_l2_isolation_domains_list_by_subscription_request, + build_l2_isolation_domains_update_administrative_state_request, + build_l2_isolation_domains_update_request, + build_l2_isolation_domains_validate_configuration_request, + build_l3_isolation_domains_commit_configuration_request, + build_l3_isolation_domains_create_request, + build_l3_isolation_domains_delete_request, + build_l3_isolation_domains_get_request, + build_l3_isolation_domains_list_by_resource_group_request, + build_l3_isolation_domains_list_by_subscription_request, + build_l3_isolation_domains_update_administrative_state_request, + build_l3_isolation_domains_update_request, + build_l3_isolation_domains_validate_configuration_request, + build_neighbor_groups_create_request, + build_neighbor_groups_delete_request, + build_neighbor_groups_get_request, + build_neighbor_groups_list_by_resource_group_request, + build_neighbor_groups_list_by_subscription_request, + build_neighbor_groups_resync_request, + build_neighbor_groups_update_request, + build_network_bootstrap_devices_create_request, + build_network_bootstrap_devices_delete_request, + build_network_bootstrap_devices_get_request, + build_network_bootstrap_devices_list_by_resource_group_request, + build_network_bootstrap_devices_list_by_subscription_request, + build_network_bootstrap_devices_reboot_request, + build_network_bootstrap_devices_refresh_configuration_request, + build_network_bootstrap_devices_resync_passwords_request, + build_network_bootstrap_devices_update_administrative_state_request, + build_network_bootstrap_devices_update_request, + build_network_bootstrap_devices_upgrade_request, + build_network_bootstrap_interfaces_create_request, + build_network_bootstrap_interfaces_delete_request, + build_network_bootstrap_interfaces_get_request, + build_network_bootstrap_interfaces_list_by_network_bootstrap_device_request, + build_network_bootstrap_interfaces_update_administrative_state_request, + build_network_bootstrap_interfaces_update_request, + build_network_device_skus_get_request, + build_network_device_skus_list_by_subscription_request, + build_network_devices_create_request, + build_network_devices_delete_request, + build_network_devices_get_request, + build_network_devices_list_by_resource_group_request, + build_network_devices_list_by_subscription_request, + build_network_devices_reboot_request, + build_network_devices_refresh_configuration_request, + build_network_devices_resync_certificates_request, + build_network_devices_resync_passwords_request, + build_network_devices_run_ro_command_request, + build_network_devices_run_rw_command_request, + build_network_devices_update_administrative_state_request, + build_network_devices_update_request, + build_network_devices_upgrade_request, + build_network_fabric_controllers_create_request, + build_network_fabric_controllers_delete_request, + build_network_fabric_controllers_get_request, + build_network_fabric_controllers_list_by_resource_group_request, + build_network_fabric_controllers_list_by_subscription_request, + build_network_fabric_controllers_update_request, + build_network_fabric_skus_get_request, + build_network_fabric_skus_list_by_subscription_request, + build_network_fabrics_arm_configuration_diff_request, + build_network_fabrics_commit_batch_status_request, + build_network_fabrics_commit_configuration_request, + build_network_fabrics_create_request, + build_network_fabrics_delete_request, + build_network_fabrics_deprovision_request, + build_network_fabrics_discard_commit_batch_request, + build_network_fabrics_get_request, + build_network_fabrics_get_topology_request, + build_network_fabrics_list_by_resource_group_request, + build_network_fabrics_list_by_subscription_request, + build_network_fabrics_lock_fabric_request, + build_network_fabrics_provision_request, + build_network_fabrics_refresh_configuration_request, + build_network_fabrics_resync_certificates_request, + build_network_fabrics_resync_passwords_request, + build_network_fabrics_rotate_certificates_request, + build_network_fabrics_rotate_passwords_request, + build_network_fabrics_update_infra_management_bfd_configuration_request, + build_network_fabrics_update_request, + build_network_fabrics_update_workload_management_bfd_configuration_request, + build_network_fabrics_upgrade_request, + build_network_fabrics_validate_configuration_request, + build_network_fabrics_view_device_configuration_request, + build_network_interfaces_create_request, + build_network_interfaces_delete_request, + build_network_interfaces_get_request, + build_network_interfaces_list_by_network_device_request, + build_network_interfaces_update_administrative_state_request, + build_network_interfaces_update_request, + build_network_monitors_create_request, + build_network_monitors_delete_request, + build_network_monitors_get_request, + build_network_monitors_list_by_resource_group_request, + build_network_monitors_list_by_subscription_request, + build_network_monitors_update_administrative_state_request, + build_network_monitors_update_request, + build_network_packet_brokers_create_request, + build_network_packet_brokers_delete_request, + build_network_packet_brokers_get_request, + build_network_packet_brokers_list_by_resource_group_request, + build_network_packet_brokers_list_by_subscription_request, + build_network_packet_brokers_update_request, + build_network_racks_create_request, + build_network_racks_delete_request, + build_network_racks_get_request, + build_network_racks_list_by_resource_group_request, + build_network_racks_list_by_subscription_request, + build_network_racks_update_request, + build_network_tap_rules_create_request, + build_network_tap_rules_delete_request, + build_network_tap_rules_get_request, + build_network_tap_rules_list_by_resource_group_request, + build_network_tap_rules_list_by_subscription_request, + build_network_tap_rules_resync_request, + build_network_tap_rules_update_administrative_state_request, + build_network_tap_rules_update_request, + build_network_tap_rules_validate_configuration_request, + build_network_taps_create_request, + build_network_taps_delete_request, + build_network_taps_get_request, + build_network_taps_list_by_resource_group_request, + build_network_taps_list_by_subscription_request, + build_network_taps_resync_request, + build_network_taps_update_administrative_state_request, + build_network_taps_update_request, + build_network_to_network_interconnects_create_request, + build_network_to_network_interconnects_delete_request, + build_network_to_network_interconnects_get_request, + build_network_to_network_interconnects_list_by_network_fabric_request, + build_network_to_network_interconnects_update_administrative_state_request, + build_network_to_network_interconnects_update_bfd_administrative_state_request, + build_network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_request, + build_network_to_network_interconnects_update_request, + build_operations_list_request, + build_route_policies_commit_configuration_request, + build_route_policies_create_request, + build_route_policies_delete_request, + build_route_policies_get_request, + build_route_policies_list_by_resource_group_request, + build_route_policies_list_by_subscription_request, + build_route_policies_update_administrative_state_request, + build_route_policies_update_request, + build_route_policies_validate_configuration_request, +) from .._configuration import ManagedNetworkFabricMgmtClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list @@ -45,8 +263,6 @@ class Operations: :attr:`operations` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -58,18 +274,17 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: - """Returns list of all operations. + """List the operations for the provider. - :return: An iterator like instance of either Operation or the result of cls(response) + :return: An iterator like instance of Operation :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -82,12 +297,17 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_operations_list_request( + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -100,18 +320,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -124,12 +355,34788 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( + error = _failsafe_deserialize( _models.ErrorResponse, - pipeline_response, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + +class AccessControlListsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`access_control_lists` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> _models.AccessControlList: + """Implements Access Control List GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: AccessControlList. The AccessControlList is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + + _request = build_access_control_lists_get_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessControlList, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_create_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.AccessControlList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Is one of the following types: AccessControlList, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AccessControlList, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AccessControlList].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlListPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_update_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.AccessControlListPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlListPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Is one of the following types: + AccessControlListPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AccessControlList, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AccessControlList].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_delete_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements Access Control List DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AccessControlList"]: + """Implements AccessControlLists list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of AccessControlList + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessControlList]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_access_control_lists_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessControlList], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.AccessControlList"]: + """Implements AccessControlLists list by subscription GET method. + + :return: An iterator like instance of AccessControlList + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessControlList]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_access_control_lists_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessControlList], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "access_control_list_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_update_administrative_state_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "access_control_list_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _resync_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_resync_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_resync( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_validate_configuration_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_validate_configuration( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class InternetGatewayRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`internet_gateway_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any + ) -> _models.InternetGatewayRule: + """Gets an Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :return: InternetGatewayRule. The InternetGatewayRule is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + + _request = build_internet_gateway_rules_get_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateway_rules_create_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: _models.InternetGatewayRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Is one of the following types: InternetGatewayRule, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateway_rules_update_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: _models.InternetGatewayRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Is one of the following types: + InternetGatewayRulePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns InternetGatewayRule. The + InternetGatewayRule is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternetGatewayRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internet_gateway_rules_delete_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements Internet Gateway Rules DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.InternetGatewayRule"]: + """Implements Internet Gateway Rules list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of InternetGatewayRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateway_rules_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGatewayRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGatewayRule"]: + """List all Internet Gateway rules in the given subscription. + + :return: An iterator like instance of InternetGatewayRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateway_rules_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGatewayRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class InternetGatewaysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`internet_gateways` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: + """Implements Gateway GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :return: InternetGateway. The InternetGateway is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + + _request = build_internet_gateways_get_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternetGateway, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGateway, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateways_create_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: _models.InternetGateway, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGateway, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Is one of the following types: InternetGateway, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGateway, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternetGateway].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGatewayPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateways_update_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: _models.InternetGatewayPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGatewayPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Is one of the + following types: InternetGatewayPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGateway, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternetGateway].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internet_gateways_delete_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Execute a delete on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.InternetGateway"]: + """Displays Internet Gateways list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of InternetGateway + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGateway]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateways_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGateway], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.InternetGateway"]: + """Displays Internet Gateways list by subscription GET method. + + :return: An iterator like instance of InternetGateway + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGateway]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateways_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGateway], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class IpCommunitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_communities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: + """Implements an IP Community GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :return: IpCommunity. The IpCommunity is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + + _request = build_ip_communities_get_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpCommunity, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_communities_create_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: _models.IpCommunity, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Is one of the following types: IpCommunity, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_communities_update_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: _models.IpCommunityPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Is one of the following types: + IpCommunityPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IpCommunity. The IpCommunity is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, ip_community_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_communities_delete_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, ip_community_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements IP Community DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: + """Implements IP Communities list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpCommunity + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_communities_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpCommunity"]: + """Implements IP Communities list by subscription GET method. + + :return: An iterator like instance of IpCommunity + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_communities_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class IpExtendedCommunitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_extended_communities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any + ) -> _models.IpExtendedCommunity: + """Implements IP Extended Community GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :return: IpExtendedCommunity. The IpExtendedCommunity is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + + _request = build_ip_extended_communities_get_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_extended_communities_create_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: _models.IpExtendedCommunity, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Is one of the following types: IpExtendedCommunity, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_extended_communities_update_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: _models.IpExtendedCommunityPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Is one of the following types: + IpExtendedCommunityPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns IpExtendedCommunity. The + IpExtendedCommunity is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpExtendedCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_extended_communities_delete_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements IP Extended Community DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IpExtendedCommunity"]: + """Implements IpExtendedCommunities list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpExtendedCommunity + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_extended_communities_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpExtendedCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpExtendedCommunity"]: + """Implements IpExtendedCommunities list by subscription GET method. + + :return: An iterator like instance of IpExtendedCommunity + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_extended_communities_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpExtendedCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class IpPrefixesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_prefixes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: + """Implements IP Prefix GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :return: IpPrefix. The IpPrefix is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + + _request = build_ip_prefixes_get_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpPrefix, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefix, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_prefixes_create_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: _models.IpPrefix, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefix, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Is one of the following types: IpPrefix, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpPrefix, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpPrefix].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_prefixes_update_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: _models.IpPrefixPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Is one of the following types: IpPrefixPatch, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpPrefix, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IpPrefix].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_prefixes_delete_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Implements IP Prefix DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: + """Implements IpPrefixes list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpPrefix + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpPrefix]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_prefixes_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpPrefix], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IpPrefix"]: + """Implements IpPrefixes list by subscription GET method. + + :return: An iterator like instance of IpPrefix + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpPrefix]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_prefixes_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpPrefix], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class L2IsolationDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`l2_isolation_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> _models.L2IsolationDomain: + """Implements L2 Isolation Domain GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: L2IsolationDomain. The L2IsolationDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_get_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_create_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.L2IsolationDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Is one of the following types: L2IsolationDomain, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_update_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.L2IsolationDomainPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Is one of + the following types: L2IsolationDomainPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.L2IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_delete_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.L2IsolationDomain"]: + """Displays L2IsolationDomains list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of L2IsolationDomain + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l2_isolation_domains_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L2IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L2IsolationDomain"]: + """Displays L2IsolationDomains list by subscription GET method. + + :return: An iterator like instance of L2IsolationDomain + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l2_isolation_domains_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L2IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l2_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_update_administrative_state_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l2_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_validate_configuration_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_validate_configuration( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _commit_configuration_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_commit_configuration_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_commit_configuration( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._commit_configuration_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class L3IsolationDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`l3_isolation_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> _models.L3IsolationDomain: + """Retrieves details of this L3 Isolation Domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: L3IsolationDomain. The L3IsolationDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.L3IsolationDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Is one of the following types: L3IsolationDomain, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.L3IsolationDomainPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Is one of + the following types: L3IsolationDomainPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.L3IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.L3IsolationDomain"]: + """Displays L3IsolationDomains list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of L3IsolationDomain + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l3_isolation_domains_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L3IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.L3IsolationDomain"]: + """Displays L3IsolationDomains list by subscription GET method. + + :return: An iterator like instance of L3IsolationDomain + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l3_isolation_domains_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L3IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_validate_configuration_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_validate_configuration( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _commit_configuration_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_commit_configuration_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_commit_configuration( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._commit_configuration_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class InternalNetworksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`internal_networks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> _models.InternalNetwork: + """Gets a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :return: InternalNetwork. The InternalNetwork is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + + _request = build_internal_networks_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternalNetwork, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetwork, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: InternalNetwork, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Is one of + the following types: InternalNetworkPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internal_networks_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements InternalNetworks DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_l3_isolation_domain( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.InternalNetwork"]: + """Displays InternalNetworks list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An iterator like instance of InternalNetwork + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternalNetwork]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internal_networks_list_by_l3_isolation_domain_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternalNetwork], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_bgp_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_bgp_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkUpdateBgpAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: + InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetworkUpdateBgpAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_bgp_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetworkUpdateBgpAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: + InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetworkUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetworkUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ExternalNetworksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`external_networks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> _models.ExternalNetwork: + """Implements ExternalNetworks GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :return: ExternalNetwork. The ExternalNetwork is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + + _request = build_external_networks_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetwork, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: ExternalNetwork, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetworkPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Is one of + the following types: ExternalNetworkPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ExternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_external_networks_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements ExternalNetworks DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_l3_isolation_domain( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ExternalNetwork"]: + """Implements External Networks list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An iterator like instance of ExternalNetwork + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ExternalNetwork]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_external_networks_list_by_l3_isolation_domain_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ExternalNetwork], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetworkUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: + ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetworkUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NeighborGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`neighbor_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: + """Gets the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: NeighborGroup. The NeighborGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_get_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NeighborGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_neighbor_groups_create_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: _models.NeighborGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Is one of the following types: NeighborGroup, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroupPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_neighbor_groups_update_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: _models.NeighborGroupPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroupPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Is one of the + following types: NeighborGroupPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NeighborGroup. The NeighborGroup is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NeighborGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_delete_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements Neighbor Group DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NeighborGroup"]: + """Displays NeighborGroups list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NeighborGroup + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NeighborGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_neighbor_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NeighborGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NeighborGroup"]: + """Displays NeighborGroups list by subscription GET method. + + :return: An iterator like instance of NeighborGroup + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NeighborGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_neighbor_groups_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NeighborGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "neighbor_group_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_initial( + self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_resync_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "neighbor_group_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync( + self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NeighborGroupResyncResponse]: + """Resync the Neighbor Group after a configuration change. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: An instance of AsyncLROPoller that returns NeighborGroupResyncResponse. The + NeighborGroupResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroupResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NeighborGroupResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroupResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NeighborGroupResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NeighborGroupResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkDeviceSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_device_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: + """Get a Network Device SKU details. + + :param network_device_sku_name: Name of the Network Device SKU. Required. + :type network_device_sku_name: str + :return: NetworkDeviceSku. The NetworkDeviceSku is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) + + _request = build_network_device_skus_get_request( + network_device_sku_name=network_device_sku_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkDeviceSku, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDeviceSku"]: + """List Network Device SKUs for the given subscription. + + :return: An iterator like instance of NetworkDeviceSku + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDeviceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_device_skus_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDeviceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkDevicesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_devices` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: + """Gets the Network Device resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: NetworkDevice. The NetworkDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + + _request = build_network_devices_get_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_create_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: NetworkDevice, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevicePatchParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_update_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDevicePatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevicePatchParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Is one of the following types: + NetworkDevicePatchParameters, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkDevice. The NetworkDevice is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_delete_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkDevice"]: + """List all the Network Device resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkDevice"]: + """List all the Network Device resources in a given subscription. + + :return: An iterator like instance of NetworkDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _reboot_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.RebootProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_reboot_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: _models.RebootProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.RebootProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: RebootProperties, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reboot_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _refresh_configuration_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_refresh_configuration_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_refresh_configuration( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceRefreshConfigurationResponse]: + """Refreshes the configuration the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceRefreshConfigurationResponse. + The NetworkDeviceRefreshConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceRefreshConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceRefreshConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDeviceRefreshConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDeviceRefreshConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_update_administrative_state_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: _models.UpdateDeviceAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkDeviceUpdateAdministrativeStateResponse. The + NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkDeviceUpdateAdministrativeStateResponse. The + NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkDeviceUpdateAdministrativeStateResponse. The + NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: UpdateDeviceAdministrativeState, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns + NetworkDeviceUpdateAdministrativeStateResponse. The + NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceUpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceUpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _upgrade_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDeviceUpgradeRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_upgrade_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDeviceUpgradeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDeviceUpgradeRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: NetworkDeviceUpgradeRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceUpgradeResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceUpgradeResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDeviceUpgradeResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDeviceUpgradeResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def _run_ro_command_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRoCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_run_ro_command_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: _models.DeviceRoCommand, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRoCommand + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRoCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Is one of the following types: DeviceRoCommand, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRoCommand or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._run_ro_command_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize( + _models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult, response.json() + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[ + _models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult + ].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _run_rw_command_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRwCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_run_rw_command_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: _models.DeviceRwCommand, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRwCommand + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRwCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Is one of the following types: DeviceRwCommand, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRwCommand or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceRunRwCommandResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._run_rw_command_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceRunRwCommandResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDeviceRunRwCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_passwords_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_resync_passwords_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync_passwords( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkDeviceResyncPasswordsResponse]: + """Resync the latest passwords to the Network Device. + + Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows + network devices missed during a previous password rotation to be brought back into sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of AsyncLROPoller that returns NetworkDeviceResyncPasswordsResponse. The + NetworkDeviceResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkDeviceResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkDeviceResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_certificates_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_resync_certificates_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync_certificates( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse]: + """Resync the latest certificates to the Network Device. + + Updates the Network Device to use the latest certificates. Does not generate new certificates. + Allows network devices missed during a previous certificate rotation to be brought back into + sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of AsyncLROPoller that returns NetworkFabricResyncCertificatesResponse. + The NetworkFabricResyncCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_certificates_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkInterfacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_interfaces` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> _models.NetworkInterface: + """Get the Network Interface resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :return: NetworkInterface. The NetworkInterface is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + + _request = build_network_interfaces_get_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkInterface, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_create_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.NetworkInterface, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Is one of the following types: NetworkInterface, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_update_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.NetworkInterfacePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Is one of the + following types: NetworkInterfacePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_interfaces_delete_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_network_device( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkInterface"]: + """List all the Network Interface resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An iterator like instance of NetworkInterface + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkInterface]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_interfaces_list_by_network_device_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkInterface], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "network_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_update_administrative_state_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "network_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkFabricControllersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabric_controllers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> _models.NetworkFabricController: + """Shows the provisioning status of Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :return: NetworkFabricController. The NetworkFabricController is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + + _request = build_network_fabric_controllers_get_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricController, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabric_controllers_create_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: _models.NetworkFabricController, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricController, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Is one of the following types: NetworkFabricController, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricControllerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabric_controllers_update_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: _models.NetworkFabricControllerPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricControllerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Is one of the following types: + NetworkFabricControllerPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricController].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabric_controllers_delete_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkFabricController"]: + """Lists all the NetworkFabricControllers thats available in the resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkFabricController + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricController]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_controllers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricController], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricController"]: + """Lists all the NetworkFabricControllers by subscription. + + :return: An iterator like instance of NetworkFabricController + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricController]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_controllers_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricController], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkFabricSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabric_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: + """Implements Network Fabric SKU GET method. + + :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. + :type network_fabric_sku_name: str + :return: NetworkFabricSku. The NetworkFabricSku is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) + + _request = build_network_fabric_skus_get_request( + network_fabric_sku_name=network_fabric_sku_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabricSku, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabricSku"]: + """Implements Network Fabric SKUs list by subscription GET method. + + :return: An iterator like instance of NetworkFabricSku + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_skus_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkFabricsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabrics` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: + """Get Network Fabric resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: NetworkFabric. The NetworkFabric is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + + _request = build_network_fabrics_get_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabric, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_create_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabric, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: NetworkFabric, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabric, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabricPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Is one of the following types: + NetworkFabricPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkFabric. The NetworkFabric is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabric, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabric].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_delete_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkFabric"]: + """List all the Network Fabric resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkFabric + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabric]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabrics_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabric], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkFabric"]: + """List all the Network Fabric resources in the given subscription. + + :return: An iterator like instance of NetworkFabric + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabric]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabrics_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabric], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _provision_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_provision_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_provision( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Provisions the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._provision_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _deprovision_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_deprovision_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_deprovision( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Deprovisions the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._deprovision_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _upgrade_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_upgrade_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpgradeNetworkFabricProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Is one of the following types: + UpgradeNetworkFabricProperties, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _refresh_configuration_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_refresh_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_refresh_configuration( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Refreshes the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_workload_management_bfd_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_workload_management_bfd_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_infra_management_bfd_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_infra_management_bfd_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.ValidateConfigurationProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_validate_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.ValidateConfigurationProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.ValidateConfigurationProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Is one of the following types: + ValidateConfigurationProperties, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _get_topology_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_get_topology_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_get_topology( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.GetTopologyResponse]: + """Gets Topology of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns GetTopologyResponse. The + GetTopologyResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.GetTopologyResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GetTopologyResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_topology_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GetTopologyResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GetTopologyResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GetTopologyResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _commit_configuration_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[Union[_models.CommitConfigurationRequest, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if body else None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_network_fabrics_commit_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[_models.CommitConfigurationRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitConfigurationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[Union[_models.CommitConfigurationRequest, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Is one of the following types: + CommitConfigurationRequest, JSON, IO[bytes] Default value is None. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitConfigurationRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[_models.CommitConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._commit_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommitConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommitConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommitConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _commit_batch_status_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.CommitBatchStatusRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_commit_batch_status_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.CommitBatchStatusRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitBatchStatusRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.CommitBatchStatusRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: CommitBatchStatusRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitBatchStatusRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommitBatchStatusOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._commit_batch_status_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommitBatchStatusOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommitBatchStatusOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommitBatchStatusOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _discard_commit_batch_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.DiscardCommitBatchRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_discard_commit_batch_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.DiscardCommitBatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.DiscardCommitBatchRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: DiscardCommitBatchRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiscardCommitBatchOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._discard_commit_batch_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiscardCommitBatchOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DiscardCommitBatchOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DiscardCommitBatchOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _lock_fabric_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricLockRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_lock_fabric_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabricLockRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricLockRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: NetworkFabricLockRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns OperationStatusResult. The + OperationStatusResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._lock_fabric_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _view_device_configuration_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_view_device_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_view_device_configuration( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ViewDeviceConfigurationOperationResponse]: + """Post action: Triggers view of network fabric configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns ViewDeviceConfigurationOperationResponse. + The ViewDeviceConfigurationOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ViewDeviceConfigurationOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._view_device_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ViewDeviceConfigurationOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ViewDeviceConfigurationOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ViewDeviceConfigurationOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _arm_configuration_diff_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_arm_configuration_diff_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_arm_configuration_diff( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ArmConfigurationDiffOperationResponse]: + """Post action: Triggers diff of NetworkFabric ARM Configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns ArmConfigurationDiffOperationResponse. The + ArmConfigurationDiffOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ArmConfigurationDiffOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArmConfigurationDiffOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._arm_configuration_diff_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ArmConfigurationDiffOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ArmConfigurationDiffOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ArmConfigurationDiffOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _rotate_passwords_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_rotate_passwords_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_rotate_passwords( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricRotatePasswordsResponse]: + """Rotate all passwords on the Terminal Server and Network Devices. + + Creates new passwords, then updates the Terminal Server and Network Devices to use the new + passwords. + + Note that disabled devices cannot be updated and must be resynchronized with the new passwords + once they are enabled. + + Fails if any of the devices could not be updated with the new password. + Failed devices should be resynchronized with the new passwords once possible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns NetworkFabricRotatePasswordsResponse. The + NetworkFabricRotatePasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricRotatePasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_passwords_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricRotatePasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricRotatePasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricRotatePasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_passwords_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_resync_passwords_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync_passwords( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricResyncPasswordsResponse]: + """Resync the latest passwords to the Terminal Server and Network Devices. + + Updates the Terminal Server and all Network Devices to use the latest passwords. Does not + generate new passwords. + + Allows devices to be brought back in sync after a partially successful password rotation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns NetworkFabricResyncPasswordsResponse. The + NetworkFabricResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _rotate_certificates_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_rotate_certificates_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_rotate_certificates( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricRotateCertificatesResponse]: + """Rotate all certificates on Network Devices. + + Creates new certificates, then updates the Network Devices to use the new certificates. Note + that disabled devices cannot be updated and must be resynchronized with the new certificates + once they are enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns NetworkFabricRotateCertificatesResponse. + The NetworkFabricRotateCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricRotateCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rotate_certificates_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricRotateCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricRotateCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricRotateCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_certificates_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_resync_certificates_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync_certificates( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse]: + """Re-sync all certificates on Network Devices. + + Updates all Network Devices to use the latest certificates. Does not generate new certificates. + Allows network devices missed during a previous certificate rotation to be brought back into + sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of AsyncLROPoller that returns NetworkFabricResyncCertificatesResponse. + The NetworkFabricResyncCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_certificates_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkFabricResyncCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkToNetworkInterconnectsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_to_network_interconnects` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> _models.NetworkToNetworkInterconnect: + """Implements NetworkToNetworkInterconnects GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :return: NetworkToNetworkInterconnect. The NetworkToNetworkInterconnect is compatible with + MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + + _request = build_network_to_network_interconnects_get_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnect, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_create_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NetworkToNetworkInterconnect, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnect, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: NetworkToNetworkInterconnect, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnectPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NetworkToNetworkInterconnectPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnectPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Is one of the following + types: NetworkToNetworkInterconnectPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_to_network_interconnects_delete_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements NetworkToNetworkInterconnects DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_network_fabric( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkToNetworkInterconnect"]: + """Implements Network To Network Interconnects list by Network Fabric GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An iterator like instance of NetworkToNetworkInterconnect + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkToNetworkInterconnect]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_to_network_interconnects_list_by_network_fabric_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkToNetworkInterconnect], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_npb_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NniUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NniUpdateBfdAdministrativeStateResponse. + The NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NniUpdateBfdAdministrativeStateResponse. + The NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NniUpdateBfdAdministrativeStateResponse. + The NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: + NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NniUpdateBfdAdministrativeStateResponse. + The NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NniUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NniUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NniUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkPacketBrokersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_packet_brokers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any + ) -> _models.NetworkPacketBroker: + """Retrieves details of this Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :return: NetworkPacketBroker. The NetworkPacketBroker is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + + _request = build_network_packet_brokers_get_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBroker, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_packet_brokers_create_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: _models.NetworkPacketBroker, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBroker, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Is one of the following types: NetworkPacketBroker, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBrokerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_packet_brokers_update_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: _models.NetworkPacketBrokerPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBrokerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Is one of the following types: + NetworkPacketBrokerPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkPacketBroker. The + NetworkPacketBroker is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkPacketBroker].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_packet_brokers_delete_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkPacketBroker"]: + """Displays NetworkPacketBrokers list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkPacketBroker + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_packet_brokers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkPacketBroker], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkPacketBroker"]: + """Displays Network Packet Brokers list by subscription GET method. + + :return: An iterator like instance of NetworkPacketBroker + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_packet_brokers_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkPacketBroker], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkRacksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_racks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: + """Get Network Rack resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :return: NetworkRack. The NetworkRack is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + + _request = build_network_racks_get_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkRack, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_racks_create_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: _models.NetworkRack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Is one of the following types: NetworkRack, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkRack, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkRack].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRackPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_racks_update_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: _models.NetworkRackPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRackPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRackPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Is one of the following types: + NetworkRackPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRackPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkRack. The NetworkRack is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkRack, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkRack].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_rack_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_racks_delete_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_rack_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: + """List all Network Rack resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkRack + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkRack]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_racks_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkRack], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkRack"]: + """List all Network Rack resources in the given subscription. + + :return: An iterator like instance of NetworkRack + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkRack]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_racks_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkRack], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class NetworkTapRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_tap_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: + """Get Network Tap Rule resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: NetworkTapRule. The NetworkTapRule is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_get_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_create_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.NetworkTapRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Is one of the following types: NetworkTapRule, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_update_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.NetworkTapRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Is one of the following types: + NetworkTapRulePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkTapRule. The NetworkTapRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTapRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_delete_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkTapRule"]: + """List all the Network Tap Rule resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkTapRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTapRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_tap_rules_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTapRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTapRule"]: + """List all the Network Tap Rule resources in the given subscription. + + :return: An iterator like instance of NetworkTapRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTapRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_tap_rules_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTapRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_update_administrative_state_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_rule_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_initial( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_resync_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_rule_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapRuleResyncResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of AsyncLROPoller that returns NetworkTapRuleResyncResponse. The + NetworkTapRuleResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapRuleResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRuleResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTapRuleResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTapRuleResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_validate_configuration_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_validate_configuration( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkTapsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_taps` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: + """Retrieves details of this Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: NetworkTap. The NetworkTap is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + + _request = build_network_taps_get_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkTap, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTap, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_create_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.NetworkTap, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTap, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Is one of the following types: NetworkTap, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTap, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_update_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.NetworkTapPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Is one of the following types: NetworkTapPatch, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkTap. The NetworkTap is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTap, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, network_tap_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_taps_delete_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, network_tap_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: + """Displays Network Taps list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkTap + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTap]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTap], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkTap"]: + """Displays Network Taps list by subscription GET method. + + :return: An iterator like instance of NetworkTap + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTap]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_taps_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTap], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_tap_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_update_administrative_state_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_tap_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_initial( + self, resource_group_name: str, network_tap_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_taps_resync_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync( + self, resource_group_name: str, network_tap_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkTapResyncResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: An instance of AsyncLROPoller that returns NetworkTapResyncResponse. The + NetworkTapResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkTapResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkTapResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class RoutePoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`route_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: + """Implements Route Policy GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: RoutePolicy. The RoutePolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + + _request = build_route_policies_get_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RoutePolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_create_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.RoutePolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Is one of the following types: RoutePolicy, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.RoutePolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_update_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.RoutePolicyPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Is one of the following types: + RoutePolicyPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns RoutePolicy. The RoutePolicy is compatible + with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.RoutePolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_delete_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Implements Route Policy DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: + """Implements RoutePolicies list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of RoutePolicy + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RoutePolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_route_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RoutePolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: + """Implements RoutePolicies list by subscription GET method. + + :return: An iterator like instance of RoutePolicy + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RoutePolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_route_policies_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RoutePolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "route_policy_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_update_administrative_state_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "route_policy_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _validate_configuration_initial( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_validate_configuration_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_validate_configuration( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of AsyncLROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._validate_configuration_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _commit_configuration_initial( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_commit_configuration_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_commit_configuration( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._commit_configuration_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkMonitorsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_monitors` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def get(self, resource_group_name: str, network_monitor_name: str, **kwargs: Any) -> _models.NetworkMonitor: + """Implements NetworkMonitor GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :return: NetworkMonitor. The NetworkMonitor is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + + _request = build_network_monitors_get_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def _create_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitor, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_create_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.NetworkMonitor, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitor, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Is one of the following types: NetworkMonitor, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkMonitor].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkMonitor]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def _update_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitorPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_update_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.NetworkMonitorPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitorPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Is one of the following types: + NetworkMonitorPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorPatch or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkMonitor. The NetworkMonitor is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkMonitor].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkMonitor]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "network_monitor_name"] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def _delete_initial( + self, resource_group_name: str, network_monitor_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_monitors_delete_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "network_monitor_name"] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def begin_delete( + self, resource_group_name: str, network_monitor_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={"2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkMonitor"]: + """Displays NetworkMonitors list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkMonitor + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkMonitor]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_monitors_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkMonitor], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={"2024-06-15-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkMonitor"]: + """Displays NetworkMonitors list by subscription GET method. + + :return: An iterator like instance of NetworkMonitor + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkMonitor]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_monitors_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkMonitor], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_update_administrative_state_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForDeviceUpdate. + The CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForDeviceUpdate. + The CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForDeviceUpdate. + The CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForDeviceUpdate. + The CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForDeviceUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkBootstrapDevicesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_bootstrap_devices` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def get( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> _models.NetworkBootstrapDevice: + """Gets a Network Bootstrap Device resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: NetworkBootstrapDevice. The NetworkBootstrapDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_get_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _create_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_create_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.NetworkBootstrapDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: NetworkBootstrapDevice, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_update_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.NetworkBootstrapDevicePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Is one of the following types: + NetworkBootstrapDevicePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_bootstrap_device_name"] + }, + api_versions_list=["2025-07-15"], + ) + async def _delete_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_delete_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_bootstrap_device_name"] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_delete( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={"2025-07-15": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2025-07-15"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkBootstrapDevice"]: + """Lists all the Network Bootstrap Device resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkBootstrapDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkBootstrapDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_bootstrap_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={"2025-07-15": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2025-07-15"], + ) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.NetworkBootstrapDevice"]: + """List all the Network Bootstrap Device resources in a given subscription. + + :return: An iterator like instance of NetworkBootstrapDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkBootstrapDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_bootstrap_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _reboot_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_reboot_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_reboot( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceRebootResponse]: + """Reboot the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDeviceRebootResponse. The + NetworkBootstrapDeviceRebootResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceRebootResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reboot_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceRebootResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDeviceRebootResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDeviceRebootResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _refresh_configuration_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_refresh_configuration_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_refresh_configuration( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse]: + """Refreshes the configuration of Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceRefreshConfigurationResponse. The + NetworkBootstrapDeviceRefreshConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceRefreshConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceRefreshConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _upgrade_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateVersion, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_upgrade_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.UpdateVersion, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateVersion, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: UpdateVersion, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDeviceUpgradeResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._upgrade_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceUpgradeResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_update_administrative_state_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.UpdateDeviceAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: UpdateDeviceAdministrativeState, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize( + _models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse, response.json() + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[ + _models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse + ].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _resync_passwords_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_resync_passwords_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_resync_passwords( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse]: + """Resync the latest passwords to the Network Bootstrap Device. + + Updates the Network Bootstrap Device to use the latest passwords. Does not generate new + passwords. Allows network bootstrap devices missed during a previous password rotation to be + brought back into sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of AsyncLROPoller that returns + NetworkBootstrapDeviceResyncPasswordsResponse. The + NetworkBootstrapDeviceResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkBootstrapInterfacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s + :attr:`network_bootstrap_interfaces` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def get( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> _models.NetworkBootstrapInterface: + """Get the Network Bootstrap Interface resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :return: NetworkBootstrapInterface. The NetworkBootstrapInterface is compatible with + MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_interfaces_get_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _create_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_create_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.NetworkBootstrapInterface, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Is one of the following types: NetworkBootstrapInterface, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_update_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.NetworkBootstrapInterfacePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Is one of + the following types: NetworkBootstrapInterfacePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatch or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.NetworkBootstrapInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.NetworkBootstrapInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _delete_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_interfaces_delete_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_delete( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def list_by_network_bootstrap_device( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NetworkBootstrapInterface"]: + """List all the Network Bootstrap Interface resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An iterator like instance of NetworkBootstrapInterface + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkBootstrapInterface]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_bootstrap_interfaces_list_by_network_bootstrap_device_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapInterface], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def _update_administrative_state_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_update_administrative_state_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + async def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py deleted file mode 100644 index c2a2d3f844eb..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/aio/operations/_route_policies_operations.py +++ /dev/null @@ -1,1281 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._route_policies_operations import ( - build_commit_configuration_request, - build_create_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_update_administrative_state_request, - build_update_request, - build_validate_configuration_request, -) -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class RoutePoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.aio.ManagedNetworkFabricMgmtClient`'s - :attr:`route_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _create_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RoutePolicy") - - _request = build_create_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.RoutePolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicy, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Is either a RoutePolicy type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO[bytes] - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.RoutePolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace_async - async def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: - """Gets a Route Policy. - - Implements Route Policy GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: RoutePolicy or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicyPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RoutePolicyPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.RoutePolicyPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicyPatch, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO[bytes] - :return: An instance of AsyncLROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.RoutePolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.RoutePolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Route Policy. - - Implements Route Policy DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: - """List RoutePolicies by resource group. - - Implements RoutePolicies list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either RoutePolicy or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.RoutePolicy"]: - """List RoutePolicies by subscription. - - Implements RoutePolicies list by subscription GET method. - - :return: An iterator like instance of either RoutePolicy or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _update_administrative_state_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForDeviceUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_administrative_state_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _validate_configuration_initial( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_validate_configuration( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of AsyncLROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._validate_configuration_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _commit_configuration_initial( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_commit_configuration( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of AsyncLROPoller that returns either - CommonPostActionResponseForStateUpdate or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._commit_configuration_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py index 4ded9635ba38..7b75b1166865 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,273 +13,450 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore AccessControlList, AccessControlListAction, + AccessControlListActionPatch, AccessControlListMatchCondition, + AccessControlListMatchConditionPatch, AccessControlListMatchConfiguration, + AccessControlListMatchConfigurationPatch, AccessControlListPatch, AccessControlListPatchProperties, - AccessControlListPatchableProperties, AccessControlListPortCondition, + AccessControlListPortConditionPatch, AccessControlListProperties, - AccessControlListsListResult, + ActionIpCommunityPatchProperties, ActionIpCommunityProperties, + ActionIpExtendedCommunityPatchProperties, ActionIpExtendedCommunityProperties, AggregateRoute, AggregateRouteConfiguration, + AggregateRoutePatchConfiguration, AnnotationResource, + ArmConfigurationDiffOperationResponse, + ArmConfigurationDiffResponseProperties, + AuthorizedTransceiverPatchProperties, + AuthorizedTransceiverProperties, BfdConfiguration, + BfdPatchConfiguration, BgpConfiguration, + BgpPatchConfiguration, + BitRate, + BmpConfigurationPatchProperties, + BmpConfigurationProperties, + BmpExportPolicyPatchProperties, + BmpExportPolicyProperties, + BurstSize, + CertificateArchiveReference, + CertificateRotationStatus, + CommitBatchDetails, + CommitBatchStatusOperationResponse, + CommitBatchStatusRequest, + CommitBatchStatusResponseProperties, + CommitConfigurationRequest, + CommitConfigurationResponse, CommonDynamicMatchConfiguration, + CommonDynamicMatchConfigurationPatch, + CommonErrorResponse, CommonMatchConditions, + CommonMatchConditionsPatch, + CommonPostActionResponseForDeviceROCommands, + CommonPostActionResponseForDeviceROCommandsOperationStatusResult, CommonPostActionResponseForDeviceUpdate, CommonPostActionResponseForStateUpdate, + ConditionalDefaultRouteProperties, ConnectedSubnet, + ConnectedSubnetPatch, ConnectedSubnetRoutePolicy, + ConnectedSubnetRoutePolicyPatch, + ControlPlanAclIpMatchCondition, + ControlPlaneAclAction, + ControlPlaneAclActionPatch, + ControlPlaneAclIpMatchConditionPatch, + ControlPlaneAclMatchCondition, + ControlPlaneAclMatchConditionPatch, + ControlPlaneAclMatchConfigurationPatchProperties, + ControlPlaneAclMatchConfigurationProperties, + ControlPlaneAclPatchProperties, + ControlPlaneAclPortCondition, + ControlPlaneAclPortMatchCondition, + ControlPlaneAclPortMatchConditionPatch, + ControlPlaneAclProperties, + ControlPlaneAclTtlMatchCondition, + ControlPlaneAclTtlMatchConditionPatch, ControllerServices, + DestinationPatchProperties, DestinationProperties, DeviceInterfaceProperties, + DeviceRoCommand, + DeviceRwCommand, + DiscardCommitBatchOperationResponse, + DiscardCommitBatchRequest, + DiscardCommitBatchResponseProperties, EnableDisableOnResources, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, ExportRoutePolicy, ExportRoutePolicyInformation, + ExportRoutePolicyInformationPatch, + ExportRoutePolicyPatch, ExpressRouteConnectionInformation, - ExtendedLocation, - ExtensionEnumProperty, ExternalNetwork, + ExternalNetworkBmpPatchProperties, + ExternalNetworkBmpProperties, ExternalNetworkPatch, ExternalNetworkPatchProperties, ExternalNetworkPatchPropertiesOptionAProperties, - ExternalNetworkPatchableProperties, ExternalNetworkProperties, ExternalNetworkPropertiesOptionAProperties, - ExternalNetworksList, + ExternalNetworkStaticRouteConfiguration, + ExternalNetworkStaticRoutePatchConfiguration, + ExternalNetworkUpdateBfdAdministrativeStateRequest, + ExternalNetworkUpdateBfdAdministrativeStateResponse, + ExternalNetworkUpdateBfdAdministrativeStateResponseProperties, + FabricLockProperties, + FeatureFlagProperties, + GetTopologyResponse, + GetTopologyResponseProperties, + GlobalAccessControlListActionPatchProperties, + GlobalAccessControlListActionProperties, + GlobalNetworkTapRuleActionPatchProperties, + GlobalNetworkTapRuleActionProperties, + HeaderAddressProperties, + IcmpConfigurationPatchProperties, + IcmpConfigurationProperties, + IdentitySelector, + IdentitySelectorPatch, ImportRoutePolicy, ImportRoutePolicyInformation, + ImportRoutePolicyInformationPatch, + ImportRoutePolicyPatch, InternalNetwork, + InternalNetworkBmpPatchProperties, + InternalNetworkBmpProperties, InternalNetworkPatch, InternalNetworkPatchProperties, - InternalNetworkPatchableProperties, InternalNetworkProperties, - InternalNetworkPropertiesBgpConfiguration, - InternalNetworkPropertiesStaticRouteConfiguration, - InternalNetworksList, + InternalNetworkUpdateBfdAdministrativeStateRequest, + InternalNetworkUpdateBfdAdministrativeStateResponse, + InternalNetworkUpdateBfdAdministrativeStateResponseProperties, + InternalNetworkUpdateBgpAdministrativeStateRequest, + InternalNetworkUpdateBgpAdministrativeStateResponse, + InternalNetworkUpdateBgpAdministrativeStateResponseProperties, InternetGateway, InternetGatewayPatch, - InternetGatewayPatchableProperties, + InternetGatewayPatchProperties, InternetGatewayProperties, InternetGatewayRule, InternetGatewayRulePatch, InternetGatewayRuleProperties, - InternetGatewayRulesListResult, - InternetGatewaysListResult, - IpCommunitiesListResult, IpCommunity, - IpCommunityAddOperationProperties, - IpCommunityDeleteOperationProperties, IpCommunityIdList, IpCommunityPatch, IpCommunityPatchableProperties, IpCommunityProperties, IpCommunityRule, - IpCommunitySetOperationProperties, IpExtendedCommunity, - IpExtendedCommunityAddOperationProperties, - IpExtendedCommunityDeleteOperationProperties, IpExtendedCommunityIdList, - IpExtendedCommunityListResult, IpExtendedCommunityPatch, IpExtendedCommunityPatchProperties, - IpExtendedCommunityPatchableProperties, IpExtendedCommunityProperties, IpExtendedCommunityRule, - IpExtendedCommunitySetOperationProperties, + IpGroupPatchProperties, IpGroupProperties, IpMatchCondition, + IpMatchConditionPatch, IpPrefix, IpPrefixPatch, IpPrefixPatchProperties, - IpPrefixPatchableProperties, IpPrefixProperties, IpPrefixRule, - IpPrefixesListResult, + IsolationDomainPatchProperties, IsolationDomainProperties, L2IsolationDomain, L2IsolationDomainPatch, L2IsolationDomainPatchProperties, L2IsolationDomainProperties, - L2IsolationDomainsListResult, L3ExportRoutePolicy, + L3ExportRoutePolicyPatch, L3IsolationDomain, L3IsolationDomainPatch, L3IsolationDomainPatchProperties, - L3IsolationDomainPatchableProperties, L3IsolationDomainProperties, - L3IsolationDomainsListResult, - L3OptionAProperties, + L3OptionBPatchProperties, L3OptionBProperties, + L3UniqueRouteDistinguisherProperties, + LastOperationProperties, Layer2Configuration, + Layer2ConfigurationPatch, + Layer3IpPrefixPatchProperties, Layer3IpPrefixProperties, ManagedResourceGroupConfiguration, - ManagementNetworkConfigurationPatchableProperties, + ManagedServiceIdentity, + ManagedServiceIdentityPatch, ManagementNetworkConfigurationProperties, + ManagementNetworkPatchConfiguration, + NativeIpv4PrefixLimitPatchProperties, + NativeIpv4PrefixLimitProperties, + NativeIpv6PrefixLimitPatchProperties, + NativeIpv6PrefixLimitProperties, NeighborAddress, + NeighborAddressBfdAdministrativeStatus, + NeighborAddressBgpAdministrativeStatus, + NeighborAddressPatch, NeighborGroup, NeighborGroupDestination, + NeighborGroupDestinationPatch, NeighborGroupPatch, NeighborGroupPatchProperties, - NeighborGroupPatchableProperties, NeighborGroupProperties, - NeighborGroupsListResult, + NeighborGroupResyncResponse, + NetworkBootstrapDevice, + NetworkBootstrapDevicePatch, + NetworkBootstrapDevicePatchProperties, + NetworkBootstrapDeviceProperties, + NetworkBootstrapDeviceRebootResponse, + NetworkBootstrapDeviceRefreshConfigurationResponse, + NetworkBootstrapDeviceResyncPasswordsResponse, + NetworkBootstrapDeviceUpdateAdministrativeStateResponse, + NetworkBootstrapDeviceUpgradeResponse, + NetworkBootstrapInterface, + NetworkBootstrapInterfacePatch, + NetworkBootstrapInterfacePatchProperties, + NetworkBootstrapInterfaceProperties, NetworkDevice, NetworkDevicePatchParameters, NetworkDevicePatchParametersProperties, - NetworkDevicePatchableProperties, NetworkDeviceProperties, + NetworkDeviceRefreshConfigurationResponse, + NetworkDeviceResyncPasswordsResponse, + NetworkDeviceRunRwCommandResponse, + NetworkDeviceRwCommandResponseProperties, NetworkDeviceSku, - NetworkDeviceSkusListResult, - NetworkDevicesListResult, + NetworkDeviceSkuProperties, + NetworkDeviceUpdateAdministrativeStateResponse, + NetworkDeviceUpgradeRequest, + NetworkDeviceUpgradeResponse, NetworkFabric, NetworkFabricController, NetworkFabricControllerPatch, - NetworkFabricControllerPatchableProperties, + NetworkFabricControllerPatchProperties, NetworkFabricControllerProperties, - NetworkFabricControllersListResult, + NetworkFabricLockRequest, NetworkFabricPatch, NetworkFabricPatchProperties, - NetworkFabricPatchableProperties, - NetworkFabricPatchablePropertiesTerminalServerConfiguration, NetworkFabricProperties, + NetworkFabricResyncCertificatesResponse, + NetworkFabricResyncPasswordsResponse, + NetworkFabricRotateCertificatesResponse, + NetworkFabricRotatePasswordsResponse, NetworkFabricSku, - NetworkFabricSkusListResult, - NetworkFabricsListResult, + NetworkFabricSkuProperties, NetworkInterface, NetworkInterfacePatch, NetworkInterfacePatchProperties, NetworkInterfaceProperties, - NetworkInterfacesList, + NetworkMonitor, + NetworkMonitorPatch, + NetworkMonitorPatchProperties, + NetworkMonitorProperties, NetworkPacketBroker, NetworkPacketBrokerPatch, - NetworkPacketBrokersListResult, + NetworkPacketBrokerProperties, NetworkRack, + NetworkRackPatch, NetworkRackProperties, - NetworkRacksListResult, NetworkTap, NetworkTapPatch, - NetworkTapPatchableParameters, - NetworkTapPatchableParametersDestinationsItem, + NetworkTapPatchProperties, NetworkTapProperties, - NetworkTapPropertiesDestinationsItem, + NetworkTapResyncResponse, NetworkTapRule, NetworkTapRuleAction, + NetworkTapRuleActionPatch, NetworkTapRuleMatchCondition, + NetworkTapRuleMatchConditionPatch, NetworkTapRuleMatchConfiguration, + NetworkTapRuleMatchConfigurationPatch, NetworkTapRulePatch, NetworkTapRulePatchProperties, - NetworkTapRulePatchableProperties, NetworkTapRuleProperties, - NetworkTapRulesListResult, - NetworkTapsListResult, + NetworkTapRuleResyncResponse, NetworkToNetworkInterconnect, NetworkToNetworkInterconnectPatch, - NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration, - NetworkToNetworkInterconnectsList, + NetworkToNetworkInterconnectPatchProperties, + NetworkToNetworkInterconnectProperties, + NniBmpPatchProperties, + NniBmpProperties, + NniStaticRouteConfiguration, + NniStaticRoutePatchConfiguration, + NniUpdateBfdAdministrativeStateRequest, + NniUpdateBfdAdministrativeStateResponse, + NniUpdateBfdAdministrativeStateResponseProperties, NpbStaticRouteConfiguration, + NpbStaticRouteConfigurationPatch, Operation, OperationDisplay, - OperationListResult, - OptionAProperties, + OperationStatusResult, OptionBLayer3Configuration, - OptionBProperties, + OptionBLayer3ConfigurationPatchProperties, + OptionBLayer3PrefixLimitPatchProperties, + OptionBLayer3PrefixLimitProperties, + PoliceRateConfigurationProperties, PortCondition, + PortConditionPatch, + PortGroupPatchProperties, PortGroupProperties, + PrefixLimitPatchProperties, + PrefixLimitProperties, ProxyResource, + ProxyResourceBase, + QosPatchProperties, + QosProperties, RebootProperties, Resource, - RoutePoliciesListResult, RoutePolicy, RoutePolicyPatch, RoutePolicyPatchableProperties, RoutePolicyProperties, + RoutePolicyStatementPatchProperties, RoutePolicyStatementProperties, + RoutePrefixLimitPatchProperties, + RoutePrefixLimitProperties, RouteTargetInformation, + RouteTargetPatchInformation, RuleProperties, + SecretArchiveReference, + SecretRotationStatus, + SecretRotationSummary, + StatementActionPatchProperties, StatementActionProperties, + StatementConditionPatchProperties, StatementConditionProperties, StaticRouteConfiguration, + StaticRoutePatchConfiguration, + StaticRoutePatchProperties, + StaticRoutePolicy, + StaticRoutePolicyPatch, StaticRouteProperties, + StationConnectionPatchProperties, + StationConnectionProperties, + StorageAccountConfiguration, + StorageAccountPatchConfiguration, SupportedConnectorProperties, SupportedVersionProperties, SystemData, TagsUpdate, TerminalServerConfiguration, - TerminalServerPatchableProperties, + TerminalServerPatchConfiguration, TrackedResource, + UniqueRouteDistinguisherPatchProperties, + UniqueRouteDistinguisherProperties, UpdateAdministrativeState, + UpdateAdministrativeStateResponse, + UpdateAdministrativeStateResponseProperties, UpdateDeviceAdministrativeState, UpdateVersion, UpgradeNetworkFabricProperties, + UserAssignedIdentity, ValidateConfigurationProperties, ValidateConfigurationResponse, + ViewDeviceConfigurationOperationResponse, + ViewDeviceConfigurationResponseProperties, + VlanGroupPatchProperties, VlanGroupProperties, VlanMatchCondition, + VlanMatchConditionPatch, VpnConfigurationPatchableProperties, - VpnConfigurationPatchablePropertiesOptionAProperties, VpnConfigurationProperties, - VpnConfigurationPropertiesOptionAProperties, + VpnOptionAPatchProperties, + VpnOptionAProperties, + VpnOptionBPatchProperties, + VpnOptionBProperties, ) -from ._managed_network_fabric_mgmt_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AclActionType, + AclType, Action, ActionType, AddressFamilyType, AdministrativeState, AllowASOverride, BfdAdministrativeState, + BgpAdministrativeState, + BitRateUnit, + BmpConfigurationState, + BmpExportPolicy, + BmpMonitoredAddressFamily, BooleanEnumProperty, + BurstSizeUnit, + CommitBatchState, + CommitConfigurationPolicy, + CommitStage, CommunityActionTypes, Condition, ConfigurationState, ConfigurationType, + ControlPlaneAclActionType, + ControlPlaneAclPortMatchType, + ControlPlaneAclTtlMatchType, CreatedByType, DestinationType, DeviceAdministrativeState, + DeviceRole, EnableDisableState, Encapsulation, EncapsulationType, + ExtendedVlan, Extension, + ExternalNetworkRouteType, FabricSkuType, GatewayType, IPAddressType, InterfaceType, + InternalNetworkRouteType, IsManagementType, IsMonitoringEnabled, IsWorkloadManagementNetworkEnabled, Layer4Protocol, + LockConfigurationState, + ManagedServiceIdentitySelectorType, + ManagedServiceIdentityType, + MicroBfdState, + NNIDerivedUniqueRouteDistinguisherConfigurationState, NetworkDeviceRole, NetworkDeviceRoleName, + NetworkFabricLockAction, + NetworkFabricLockType, NetworkFabricUpgradeAction, NetworkRackType, NfcSku, NniType, Origin, PeeringOption, - PollingIntervalInSeconds, PollingType, PortType, PrefixType, ProvisioningState, + QosConfigurationState, RebootType, RedistributeConnectedSubnets, RedistributeStaticRoutes, RoutePolicyActionType, RoutePolicyConditionType, + RouteType, + RuleCondition, SourceDestinationType, + StationConfigurationState, + StationConnectionMode, + SynchronizationStatus, TapRuleActionType, + UniqueRouteDistinguisherConfigurationState, + V4OverV6BgpSessionState, + V6OverV4BgpSessionState, ValidateAction, WellKnownCommunities, ) @@ -290,267 +467,444 @@ __all__ = [ "AccessControlList", "AccessControlListAction", + "AccessControlListActionPatch", "AccessControlListMatchCondition", + "AccessControlListMatchConditionPatch", "AccessControlListMatchConfiguration", + "AccessControlListMatchConfigurationPatch", "AccessControlListPatch", "AccessControlListPatchProperties", - "AccessControlListPatchableProperties", "AccessControlListPortCondition", + "AccessControlListPortConditionPatch", "AccessControlListProperties", - "AccessControlListsListResult", + "ActionIpCommunityPatchProperties", "ActionIpCommunityProperties", + "ActionIpExtendedCommunityPatchProperties", "ActionIpExtendedCommunityProperties", "AggregateRoute", "AggregateRouteConfiguration", + "AggregateRoutePatchConfiguration", "AnnotationResource", + "ArmConfigurationDiffOperationResponse", + "ArmConfigurationDiffResponseProperties", + "AuthorizedTransceiverPatchProperties", + "AuthorizedTransceiverProperties", "BfdConfiguration", + "BfdPatchConfiguration", "BgpConfiguration", + "BgpPatchConfiguration", + "BitRate", + "BmpConfigurationPatchProperties", + "BmpConfigurationProperties", + "BmpExportPolicyPatchProperties", + "BmpExportPolicyProperties", + "BurstSize", + "CertificateArchiveReference", + "CertificateRotationStatus", + "CommitBatchDetails", + "CommitBatchStatusOperationResponse", + "CommitBatchStatusRequest", + "CommitBatchStatusResponseProperties", + "CommitConfigurationRequest", + "CommitConfigurationResponse", "CommonDynamicMatchConfiguration", + "CommonDynamicMatchConfigurationPatch", + "CommonErrorResponse", "CommonMatchConditions", + "CommonMatchConditionsPatch", + "CommonPostActionResponseForDeviceROCommands", + "CommonPostActionResponseForDeviceROCommandsOperationStatusResult", "CommonPostActionResponseForDeviceUpdate", "CommonPostActionResponseForStateUpdate", + "ConditionalDefaultRouteProperties", "ConnectedSubnet", + "ConnectedSubnetPatch", "ConnectedSubnetRoutePolicy", + "ConnectedSubnetRoutePolicyPatch", + "ControlPlanAclIpMatchCondition", + "ControlPlaneAclAction", + "ControlPlaneAclActionPatch", + "ControlPlaneAclIpMatchConditionPatch", + "ControlPlaneAclMatchCondition", + "ControlPlaneAclMatchConditionPatch", + "ControlPlaneAclMatchConfigurationPatchProperties", + "ControlPlaneAclMatchConfigurationProperties", + "ControlPlaneAclPatchProperties", + "ControlPlaneAclPortCondition", + "ControlPlaneAclPortMatchCondition", + "ControlPlaneAclPortMatchConditionPatch", + "ControlPlaneAclProperties", + "ControlPlaneAclTtlMatchCondition", + "ControlPlaneAclTtlMatchConditionPatch", "ControllerServices", + "DestinationPatchProperties", "DestinationProperties", "DeviceInterfaceProperties", + "DeviceRoCommand", + "DeviceRwCommand", + "DiscardCommitBatchOperationResponse", + "DiscardCommitBatchRequest", + "DiscardCommitBatchResponseProperties", "EnableDisableOnResources", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", "ExportRoutePolicy", "ExportRoutePolicyInformation", + "ExportRoutePolicyInformationPatch", + "ExportRoutePolicyPatch", "ExpressRouteConnectionInformation", - "ExtendedLocation", - "ExtensionEnumProperty", "ExternalNetwork", + "ExternalNetworkBmpPatchProperties", + "ExternalNetworkBmpProperties", "ExternalNetworkPatch", "ExternalNetworkPatchProperties", "ExternalNetworkPatchPropertiesOptionAProperties", - "ExternalNetworkPatchableProperties", "ExternalNetworkProperties", "ExternalNetworkPropertiesOptionAProperties", - "ExternalNetworksList", + "ExternalNetworkStaticRouteConfiguration", + "ExternalNetworkStaticRoutePatchConfiguration", + "ExternalNetworkUpdateBfdAdministrativeStateRequest", + "ExternalNetworkUpdateBfdAdministrativeStateResponse", + "ExternalNetworkUpdateBfdAdministrativeStateResponseProperties", + "FabricLockProperties", + "FeatureFlagProperties", + "GetTopologyResponse", + "GetTopologyResponseProperties", + "GlobalAccessControlListActionPatchProperties", + "GlobalAccessControlListActionProperties", + "GlobalNetworkTapRuleActionPatchProperties", + "GlobalNetworkTapRuleActionProperties", + "HeaderAddressProperties", + "IcmpConfigurationPatchProperties", + "IcmpConfigurationProperties", + "IdentitySelector", + "IdentitySelectorPatch", "ImportRoutePolicy", "ImportRoutePolicyInformation", + "ImportRoutePolicyInformationPatch", + "ImportRoutePolicyPatch", "InternalNetwork", + "InternalNetworkBmpPatchProperties", + "InternalNetworkBmpProperties", "InternalNetworkPatch", "InternalNetworkPatchProperties", - "InternalNetworkPatchableProperties", "InternalNetworkProperties", - "InternalNetworkPropertiesBgpConfiguration", - "InternalNetworkPropertiesStaticRouteConfiguration", - "InternalNetworksList", + "InternalNetworkUpdateBfdAdministrativeStateRequest", + "InternalNetworkUpdateBfdAdministrativeStateResponse", + "InternalNetworkUpdateBfdAdministrativeStateResponseProperties", + "InternalNetworkUpdateBgpAdministrativeStateRequest", + "InternalNetworkUpdateBgpAdministrativeStateResponse", + "InternalNetworkUpdateBgpAdministrativeStateResponseProperties", "InternetGateway", "InternetGatewayPatch", - "InternetGatewayPatchableProperties", + "InternetGatewayPatchProperties", "InternetGatewayProperties", "InternetGatewayRule", "InternetGatewayRulePatch", "InternetGatewayRuleProperties", - "InternetGatewayRulesListResult", - "InternetGatewaysListResult", - "IpCommunitiesListResult", "IpCommunity", - "IpCommunityAddOperationProperties", - "IpCommunityDeleteOperationProperties", "IpCommunityIdList", "IpCommunityPatch", "IpCommunityPatchableProperties", "IpCommunityProperties", "IpCommunityRule", - "IpCommunitySetOperationProperties", "IpExtendedCommunity", - "IpExtendedCommunityAddOperationProperties", - "IpExtendedCommunityDeleteOperationProperties", "IpExtendedCommunityIdList", - "IpExtendedCommunityListResult", "IpExtendedCommunityPatch", "IpExtendedCommunityPatchProperties", - "IpExtendedCommunityPatchableProperties", "IpExtendedCommunityProperties", "IpExtendedCommunityRule", - "IpExtendedCommunitySetOperationProperties", + "IpGroupPatchProperties", "IpGroupProperties", "IpMatchCondition", + "IpMatchConditionPatch", "IpPrefix", "IpPrefixPatch", "IpPrefixPatchProperties", - "IpPrefixPatchableProperties", "IpPrefixProperties", "IpPrefixRule", - "IpPrefixesListResult", + "IsolationDomainPatchProperties", "IsolationDomainProperties", "L2IsolationDomain", "L2IsolationDomainPatch", "L2IsolationDomainPatchProperties", "L2IsolationDomainProperties", - "L2IsolationDomainsListResult", "L3ExportRoutePolicy", + "L3ExportRoutePolicyPatch", "L3IsolationDomain", "L3IsolationDomainPatch", "L3IsolationDomainPatchProperties", - "L3IsolationDomainPatchableProperties", "L3IsolationDomainProperties", - "L3IsolationDomainsListResult", - "L3OptionAProperties", + "L3OptionBPatchProperties", "L3OptionBProperties", + "L3UniqueRouteDistinguisherProperties", + "LastOperationProperties", "Layer2Configuration", + "Layer2ConfigurationPatch", + "Layer3IpPrefixPatchProperties", "Layer3IpPrefixProperties", "ManagedResourceGroupConfiguration", - "ManagementNetworkConfigurationPatchableProperties", + "ManagedServiceIdentity", + "ManagedServiceIdentityPatch", "ManagementNetworkConfigurationProperties", + "ManagementNetworkPatchConfiguration", + "NativeIpv4PrefixLimitPatchProperties", + "NativeIpv4PrefixLimitProperties", + "NativeIpv6PrefixLimitPatchProperties", + "NativeIpv6PrefixLimitProperties", "NeighborAddress", + "NeighborAddressBfdAdministrativeStatus", + "NeighborAddressBgpAdministrativeStatus", + "NeighborAddressPatch", "NeighborGroup", "NeighborGroupDestination", + "NeighborGroupDestinationPatch", "NeighborGroupPatch", "NeighborGroupPatchProperties", - "NeighborGroupPatchableProperties", "NeighborGroupProperties", - "NeighborGroupsListResult", + "NeighborGroupResyncResponse", + "NetworkBootstrapDevice", + "NetworkBootstrapDevicePatch", + "NetworkBootstrapDevicePatchProperties", + "NetworkBootstrapDeviceProperties", + "NetworkBootstrapDeviceRebootResponse", + "NetworkBootstrapDeviceRefreshConfigurationResponse", + "NetworkBootstrapDeviceResyncPasswordsResponse", + "NetworkBootstrapDeviceUpdateAdministrativeStateResponse", + "NetworkBootstrapDeviceUpgradeResponse", + "NetworkBootstrapInterface", + "NetworkBootstrapInterfacePatch", + "NetworkBootstrapInterfacePatchProperties", + "NetworkBootstrapInterfaceProperties", "NetworkDevice", "NetworkDevicePatchParameters", "NetworkDevicePatchParametersProperties", - "NetworkDevicePatchableProperties", "NetworkDeviceProperties", + "NetworkDeviceRefreshConfigurationResponse", + "NetworkDeviceResyncPasswordsResponse", + "NetworkDeviceRunRwCommandResponse", + "NetworkDeviceRwCommandResponseProperties", "NetworkDeviceSku", - "NetworkDeviceSkusListResult", - "NetworkDevicesListResult", + "NetworkDeviceSkuProperties", + "NetworkDeviceUpdateAdministrativeStateResponse", + "NetworkDeviceUpgradeRequest", + "NetworkDeviceUpgradeResponse", "NetworkFabric", "NetworkFabricController", "NetworkFabricControllerPatch", - "NetworkFabricControllerPatchableProperties", + "NetworkFabricControllerPatchProperties", "NetworkFabricControllerProperties", - "NetworkFabricControllersListResult", + "NetworkFabricLockRequest", "NetworkFabricPatch", "NetworkFabricPatchProperties", - "NetworkFabricPatchableProperties", - "NetworkFabricPatchablePropertiesTerminalServerConfiguration", "NetworkFabricProperties", + "NetworkFabricResyncCertificatesResponse", + "NetworkFabricResyncPasswordsResponse", + "NetworkFabricRotateCertificatesResponse", + "NetworkFabricRotatePasswordsResponse", "NetworkFabricSku", - "NetworkFabricSkusListResult", - "NetworkFabricsListResult", + "NetworkFabricSkuProperties", "NetworkInterface", "NetworkInterfacePatch", "NetworkInterfacePatchProperties", "NetworkInterfaceProperties", - "NetworkInterfacesList", + "NetworkMonitor", + "NetworkMonitorPatch", + "NetworkMonitorPatchProperties", + "NetworkMonitorProperties", "NetworkPacketBroker", "NetworkPacketBrokerPatch", - "NetworkPacketBrokersListResult", + "NetworkPacketBrokerProperties", "NetworkRack", + "NetworkRackPatch", "NetworkRackProperties", - "NetworkRacksListResult", "NetworkTap", "NetworkTapPatch", - "NetworkTapPatchableParameters", - "NetworkTapPatchableParametersDestinationsItem", + "NetworkTapPatchProperties", "NetworkTapProperties", - "NetworkTapPropertiesDestinationsItem", + "NetworkTapResyncResponse", "NetworkTapRule", "NetworkTapRuleAction", + "NetworkTapRuleActionPatch", "NetworkTapRuleMatchCondition", + "NetworkTapRuleMatchConditionPatch", "NetworkTapRuleMatchConfiguration", + "NetworkTapRuleMatchConfigurationPatch", "NetworkTapRulePatch", "NetworkTapRulePatchProperties", - "NetworkTapRulePatchableProperties", "NetworkTapRuleProperties", - "NetworkTapRulesListResult", - "NetworkTapsListResult", + "NetworkTapRuleResyncResponse", "NetworkToNetworkInterconnect", "NetworkToNetworkInterconnectPatch", - "NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration", - "NetworkToNetworkInterconnectsList", + "NetworkToNetworkInterconnectPatchProperties", + "NetworkToNetworkInterconnectProperties", + "NniBmpPatchProperties", + "NniBmpProperties", + "NniStaticRouteConfiguration", + "NniStaticRoutePatchConfiguration", + "NniUpdateBfdAdministrativeStateRequest", + "NniUpdateBfdAdministrativeStateResponse", + "NniUpdateBfdAdministrativeStateResponseProperties", "NpbStaticRouteConfiguration", + "NpbStaticRouteConfigurationPatch", "Operation", "OperationDisplay", - "OperationListResult", - "OptionAProperties", + "OperationStatusResult", "OptionBLayer3Configuration", - "OptionBProperties", + "OptionBLayer3ConfigurationPatchProperties", + "OptionBLayer3PrefixLimitPatchProperties", + "OptionBLayer3PrefixLimitProperties", + "PoliceRateConfigurationProperties", "PortCondition", + "PortConditionPatch", + "PortGroupPatchProperties", "PortGroupProperties", + "PrefixLimitPatchProperties", + "PrefixLimitProperties", "ProxyResource", + "ProxyResourceBase", + "QosPatchProperties", + "QosProperties", "RebootProperties", "Resource", - "RoutePoliciesListResult", "RoutePolicy", "RoutePolicyPatch", "RoutePolicyPatchableProperties", "RoutePolicyProperties", + "RoutePolicyStatementPatchProperties", "RoutePolicyStatementProperties", + "RoutePrefixLimitPatchProperties", + "RoutePrefixLimitProperties", "RouteTargetInformation", + "RouteTargetPatchInformation", "RuleProperties", + "SecretArchiveReference", + "SecretRotationStatus", + "SecretRotationSummary", + "StatementActionPatchProperties", "StatementActionProperties", + "StatementConditionPatchProperties", "StatementConditionProperties", "StaticRouteConfiguration", + "StaticRoutePatchConfiguration", + "StaticRoutePatchProperties", + "StaticRoutePolicy", + "StaticRoutePolicyPatch", "StaticRouteProperties", + "StationConnectionPatchProperties", + "StationConnectionProperties", + "StorageAccountConfiguration", + "StorageAccountPatchConfiguration", "SupportedConnectorProperties", "SupportedVersionProperties", "SystemData", "TagsUpdate", "TerminalServerConfiguration", - "TerminalServerPatchableProperties", + "TerminalServerPatchConfiguration", "TrackedResource", + "UniqueRouteDistinguisherPatchProperties", + "UniqueRouteDistinguisherProperties", "UpdateAdministrativeState", + "UpdateAdministrativeStateResponse", + "UpdateAdministrativeStateResponseProperties", "UpdateDeviceAdministrativeState", "UpdateVersion", "UpgradeNetworkFabricProperties", + "UserAssignedIdentity", "ValidateConfigurationProperties", "ValidateConfigurationResponse", + "ViewDeviceConfigurationOperationResponse", + "ViewDeviceConfigurationResponseProperties", + "VlanGroupPatchProperties", "VlanGroupProperties", "VlanMatchCondition", + "VlanMatchConditionPatch", "VpnConfigurationPatchableProperties", - "VpnConfigurationPatchablePropertiesOptionAProperties", "VpnConfigurationProperties", - "VpnConfigurationPropertiesOptionAProperties", + "VpnOptionAPatchProperties", + "VpnOptionAProperties", + "VpnOptionBPatchProperties", + "VpnOptionBProperties", "AclActionType", + "AclType", "Action", "ActionType", "AddressFamilyType", "AdministrativeState", "AllowASOverride", "BfdAdministrativeState", + "BgpAdministrativeState", + "BitRateUnit", + "BmpConfigurationState", + "BmpExportPolicy", + "BmpMonitoredAddressFamily", "BooleanEnumProperty", + "BurstSizeUnit", + "CommitBatchState", + "CommitConfigurationPolicy", + "CommitStage", "CommunityActionTypes", "Condition", "ConfigurationState", "ConfigurationType", + "ControlPlaneAclActionType", + "ControlPlaneAclPortMatchType", + "ControlPlaneAclTtlMatchType", "CreatedByType", "DestinationType", "DeviceAdministrativeState", + "DeviceRole", "EnableDisableState", "Encapsulation", "EncapsulationType", + "ExtendedVlan", "Extension", + "ExternalNetworkRouteType", "FabricSkuType", "GatewayType", "IPAddressType", "InterfaceType", + "InternalNetworkRouteType", "IsManagementType", "IsMonitoringEnabled", "IsWorkloadManagementNetworkEnabled", "Layer4Protocol", + "LockConfigurationState", + "ManagedServiceIdentitySelectorType", + "ManagedServiceIdentityType", + "MicroBfdState", + "NNIDerivedUniqueRouteDistinguisherConfigurationState", "NetworkDeviceRole", "NetworkDeviceRoleName", + "NetworkFabricLockAction", + "NetworkFabricLockType", "NetworkFabricUpgradeAction", "NetworkRackType", "NfcSku", "NniType", "Origin", "PeeringOption", - "PollingIntervalInSeconds", "PollingType", "PortType", "PrefixType", "ProvisioningState", + "QosConfigurationState", "RebootType", "RedistributeConnectedSubnets", "RedistributeStaticRoutes", "RoutePolicyActionType", "RoutePolicyConditionType", + "RouteType", + "RuleCondition", "SourceDestinationType", + "StationConfigurationState", + "StationConnectionMode", + "SynchronizationStatus", "TapRuleActionType", + "UniqueRouteDistinguisherConfigurationState", + "V4OverV6BgpSessionState", + "V6OverV4BgpSessionState", "ValidateAction", "WellKnownCommunities", ] diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_enums.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_enums.py new file mode 100644 index 000000000000..1502784700d1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_enums.py @@ -0,0 +1,935 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AclActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of actions that can be performed.""" + + DROP = "Drop" + """AclActionType Drop.""" + COUNT = "Count" + """AclActionType Count.""" + LOG = "Log" + """AclActionType Log.""" + REMARK = "Remark" + """AclActionType Remark.""" + POLICE_RATE = "PoliceRate" + """AclActionType PoliceRate.""" + + +class AclType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Access Control List (ACL) Type.""" + + CP = "ControlPlaneTrafficPolicy" + """AclType Control Plane Traffic Policy.""" + TENANT = "Tenant" + """AclType Tenant.""" + MANAGEMENT = "Management" + """AclType Management.""" + CONTROL_PLANE_ACL = "ControlPlaneAcl" + """Control Plane Access Control List (ACL).""" + + +class Action(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify action.""" + + ALLOW = "Allow" + """Action Allow.""" + DENY = "Deny" + """Action Deny.""" + + +class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal + only APIs. + """ + + INTERNAL = "Internal" + """Actions are for internal-only APIs.""" + + +class AddressFamilyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy.""" + + I_PV4 = "IPv4" + """AddressType-IPv4.""" + I_PV6 = "IPv6" + """AddressType-IPv6.""" + + +class AdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State defined to represent administrative actions or post actions on a particular resource.""" + + ENABLED = "Enabled" + """Enabled Administrative State.""" + DISABLED = "Disabled" + """Disabled Administrative State.""" + MAT = "MAT" + """MAT(Manual Action Taken) Administrative State.""" + RMA = "RMA" + """RMA(Return Material Authorization) Administrative State.""" + UNDER_MAINTENANCE = "UnderMaintenance" + """UnderMaintenance Administrative State.""" + ENABLED_DEGRADED = "EnabledDegraded" + """EnabledDegraded Administrative State.""" + + +class AllowASOverride(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enable Or Disable state.""" + + ENABLE = "Enable" + """AllowASOverride-Enable.""" + DISABLE = "Disable" + """AllowASOverride-Disable.""" + + +class BfdAdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Administrative state of the BfdConfiguration. Example: Enabled | Disabled.""" + + ENABLED = "Enabled" + """Represents the enabled state of BFD administrative state.""" + DISABLED = "Disabled" + """Represents the disabled state of BFD administrative state.""" + MAT = "MAT" + """Represents the MAT(Manual Action Taken) state of BFD administrative state.""" + RMA = "RMA" + """Represents the RMA(Return Material Authorization) state of BFD administrative state.""" + + +class BgpAdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Border Gateway Protocol (BGP) Administrative State values.""" + + ENABLED = "Enabled" + """BgpAdministrativeState-Enabled.""" + DISABLED = "Disabled" + """BgpAdministrativeState-Disabled.""" + + +class BitRateUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Bit rate unit.""" + + BPS = "bps" + """Bit rate unit in bits per second.""" + KBPS = "Kbps" + """Bit rate unit in kilobits per second.""" + MBPS = "Mbps" + """Bit rate unit in megabits per second.""" + GBPS = "Gbps" + """Bit rate unit in gigabits per second.""" + PPS = "Pps" + """Bit rate unit in packets per second.""" + + +class BmpConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """BGP Monitoring Protocol (BMP) configuration state.""" + + ENABLED = "Enabled" + """BGP Monitoring Protocol (BMP) ConfigurationState - Enabled.""" + DISABLED = "Disabled" + """BGP Monitoring Protocol (BMP) ConfigurationState - Disabled.""" + + +class BmpExportPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Export Policy for the BGP Monitoring Protocol (BMP) Configuration.""" + + PRE_POLICY = "Pre-Policy" + """BMP ExportPolicy Pre-Policy.""" + POST_POLICY = "Post-Policy" + """BMP ExportPolicy Post-Policy.""" + ALL = "All" + """BMP ExportPolicy All.""" + LOCAL_RIB = "LocalRib" + """BMP ExportPolicy LocalRib.""" + + +class BmpMonitoredAddressFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Monitored Address Family.""" + + IPV4_UNICAST = "ipv4Unicast" + """IPv4 Unicast.""" + IPV6_UNICAST = "ipv6Unicast" + """IPv6 Unicast.""" + VPN_IPV4 = "vpnIpv4" + """VPN IPv4.""" + VPN_IPV6 = "vpnIpv6" + """VPN IPv6.""" + ALL = "All" + """All Address Families.""" + + +class BooleanEnumProperty(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Boolean union. Example- True/False.""" + + TRUE = "True" + """EnumProperty-True.""" + FALSE = "False" + """EnumProperty-False.""" + + +class BurstSizeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Burst size unit in packets.""" + + BYTES = "Bytes" + """Burst size unit in bytes.""" + K_BYTES = "KBytes" + """Burst size unit in kilobytes.""" + M_BYTES = "MBytes" + """Burst size unit in megabytes.""" + G_BYTES = "GBytes" + """Burst size unit in gigabytes.""" + PACKETS = "Packets" + """Burst size unit in packets.""" + + +class CommitBatchState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Commit Batch State.""" + + PROCESSING = "Processing" + """CommitBatchState-PartialSuccess.""" + SUCCEEDED = "Succeeded" + """CommitBatchState-Succeeded.""" + FAILED = "Failed" + """CommitBatchState-Failed.""" + + +class CommitConfigurationPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates Commit configuration staging policy. Supported policy is StageCEConfiguration, which + indicates to prepare the configuration for the CE device type. + """ + + STAGE_CE_CONFIGURATION = "StageCEConfiguration" + """CommitConfigurationPolicy-StageCEConfiguration.""" + + +class CommitStage(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Commit stage Action to be performed.""" + + START = "Start" + """CommitStage-Start indicates to prepare the device configuration for the devices which is + decided by policy type.""" + CONTINUE = "Continue" + """CommitStage-Continue indicates to push the configuration to the devices provided. Either CE1 or + CE2 is allowed.""" + ROLLBACK = "Rollback" + """CommitStage-Rollback indicates to revert to the previous configuration for the devices to which + configuration is pushed as part of staging.""" + + +class CommunityActionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Community action types. Example: Permit | Deny.""" + + PERMIT = "Permit" + """Permit Community Action Types.""" + DENY = "Deny" + """Deny Community Action Types.""" + + +class Condition(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify prefix-list bounds.""" + + EQUAL_TO = "EqualTo" + """Condition-EqualTo.""" + GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" + """Condition-GreaterThanOrEqualTo.""" + LESSER_THAN_OR_EQUAL_TO = "LesserThanOrEqualTo" + """Condition-LesserThanOrEqualTo.""" + RANGE = "Range" + """Condition-Range.""" + + +class ConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Configuration state for the resource.""" + + SUCCEEDED = "Succeeded" + """Success Configuration State.""" + FAILED = "Failed" + """Failed Configuration State.""" + REJECTED = "Rejected" + """Rejected Configuration State.""" + ACCEPTED = "Accepted" + """Accepted Configuration State.""" + PROVISIONED = "Provisioned" + """Provisioned Configuration State.""" + ERROR_PROVISIONING = "ErrorProvisioning" + """ErrorProvisioning Configuration State.""" + DEPROVISIONING = "Deprovisioning" + """Deprovisioning Configuration State.""" + DEPROVISIONED = "Deprovisioned" + """Deprovisioned Configuration State.""" + ERROR_DEPROVISIONING = "ErrorDeprovisioning" + """ErrorDeprovisioning Configuration State.""" + DEFERRED_CONTROL = "DeferredControl" + """DeferredControl Configuration State.""" + PROVISIONING = "Provisioning" + """Provisioning Configuration State.""" + PENDING_COMMIT = "PendingCommit" + """PendingCommit Configuration State.""" + PENDING_ADMINISTRATIVE_UPDATE = "PendingAdministrativeUpdate" + """PendingAdministrativeUpdate State.""" + + +class ConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Input method to configure Access Control List.""" + + FILE = "File" + """File Configuration Type.""" + INLINE = "Inline" + """Inline Configuration Type.""" + + +class ControlPlaneAclActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Control Plane Access Control List (ACL) Action Types.""" + + PERMIT = "Permit" + """AclActionType Permit.""" + DENY = "Deny" + """AclActionType Deny.""" + REMARK = "Remark" + """AclActionType Remark.""" + + +class ControlPlaneAclPortMatchType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Control Plane Access Control List (ACL) port match types.""" + + EQUALS = "eq" + """Port-eq.""" + NOT_EQUALS = "neq" + """Port-neq.""" + GREATER_THAN = "gt" + """Port-gt.""" + LESSER_THAN = "lt" + """Port-lt.""" + RANGE = "range" + """Port-gt-eq.""" + + +class ControlPlaneAclTtlMatchType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Control Plane Access Control List (ACL) Time To Live (TTL) match conditions properties.""" + + EQUALS = "eq" + """TTL-eq.""" + NOT_EQUALS = "neq" + """TTL-neq.""" + GREATER_THAN = "gt" + """TTL-gt.""" + LESSER_THAN = "lt" + """TTL-lt.""" + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The kind of entity that created the resource.""" + + USER = "User" + """The entity was created by a user.""" + APPLICATION = "Application" + """The entity was created by an application.""" + MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" + KEY = "Key" + """The entity was created by a key.""" + + +class DestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of destination. Input can be IsolationDomain or Direct.""" + + ISOLATION_DOMAIN = "IsolationDomain" + """DestinationType-IsolationDomain.""" + DIRECT = "Direct" + """DestinationType-Direct.""" + + +class DeviceAdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Administrative state.""" + + RMA = "RMA" + """Device AdministrativeState-RMA.""" + UNGRACEFUL_RMA = "UngracefulRMA" + """Device AdministrativeState-RMA(Return Material Authorization) Ungraceful.""" + RESYNC = "Resync" + """Device AdministrativeState-Resync.""" + GRACEFUL_QUARANTINE = "GracefulQuarantine" + """Device AdministrativeState-GracefulQuarantine.""" + UNGRACEFUL_QUARANTINE = "UngracefulQuarantine" + """Device AdministrativeState-UngracefulQuarantine.""" + QUARANTINE = "Quarantine" + """Device AdministrativeState-Quarantine.""" + UNDER_MAINTENANCE = "UnderMaintenance" + """Device AdministrativeState-UnderMaintenance.""" + ENABLE = "Enable" + """Device AdministrativeState-Enable.""" + DISABLE = "Disable" + """Device AdministrativeState-Disable.""" + + +class DeviceRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Device Role.""" + + CE = "CE" + """DeviceRole - Customer Edge (CE).""" + TO_R = "ToR" + """DeviceRole - Top of Rack (ToR).""" + NPB = "NPB" + """DeviceRole - Network Packet Broker (NPB).""" + MANAGEMENT_SWITCH = "ManagementSwitch" + """Device Role Management Switch.""" + + +class EnableDisableState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Administrative state.""" + + ENABLE = "Enable" + """AdministrativeState Enable.""" + DISABLE = "Disable" + """AdministrativeState Disable.""" + UNDER_MAINTENANCE = "UnderMaintenance" + """AdministrativeState UnderMaintenance.""" + + +class Encapsulation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of encapsulation.""" + + NONE = "None" + """Encapsulation-None.""" + GRE = "GRE" + """Encapsulation-GRE.""" + + +class EncapsulationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Encapsulation Type that needs to be matched.""" + + NONE = "None" + """None EncapsulationType.""" + GT_PV1 = "GTPv1" + """GTPv1 EncapsulationType.""" + + +class ExtendedVlan(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Extended VLAN status.""" + + ENABLED = "Enabled" + """Extended VLAN is enabled.""" + DISABLED = "Disabled" + """Extended VLAN is disabled.""" + + +class Extension(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Extension. Example: NoExtension | NPB.""" + + NO_EXTENSION = "NoExtension" + """Extension-NoExtension.""" + NPB = "NPB" + """Extension-NPB.""" + + +class ExternalNetworkRouteType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """External Network RouteType.""" + + STATIC = "Static" + """ExternalNetwork Static.""" + OPTION_A = "OptionA" + """ExternalNetwork OptionA.""" + + +class FabricSkuType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of Network Fabric SKU.""" + + SINGLE_RACK = "SingleRack" + """FabricSkuType-SingleRack.""" + MULTI_RACK = "MultiRack" + """FabricSkuType-MultiRack.""" + + +class GatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Gateway Type of the resource.""" + + INFRASTRUCTURE = "Infrastructure" + """GatewayType Infrastructure.""" + WORKLOAD = "Workload" + """GatewayType Workload.""" + + +class InterfaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Interface Type. Example: Management/Data.""" + + MANAGEMENT = "Management" + """InterfaceType-Management.""" + DATA = "Data" + """InterfaceType-Data.""" + + +class InternalNetworkRouteType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Internal Network RouteType.""" + + STATIC = "Static" + """InternalNetwork Static.""" + BGP = "Bgp" + """InternalNetwork Bgp.""" + + +class IPAddressType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IP Address type.""" + + I_PV4 = "IPv4" + """IPv4 IP address.""" + I_PV6 = "IPv6" + """IPv6 IP address.""" + + +class IsManagementType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Configuration to use NNI for Infrastructure Management. Example: True/False.""" + + TRUE = "True" + """IsManagementType-True.""" + FALSE = "False" + """IsManagementType-False.""" + + +class IsMonitoringEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """To check whether monitoring of internal network is enabled or not.""" + + TRUE = "True" + """IsMonitoringEnabled-True.""" + FALSE = "False" + """IsMonitoringEnabled-False.""" + + +class IsWorkloadManagementNetworkEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """A workload management network is required for all the tenant (workload) traffic. This traffic + is only dedicated for Tenant workloads which are required to access internet or any other + MSFT/Public endpoints. + """ + + TRUE = "True" + """IsWorkloadManagementNetworkEnabled-True.""" + FALSE = "False" + """IsWorkloadManagementNetworkEnabled-False.""" + + +class Layer4Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Layer4 protocol type that needs to be matched.""" + + TCP = "TCP" + """TCP(Transmission Control Protocol) Protocol.""" + UDP = "UDP" + """UDP(User Datagram Protocol) Protocol.""" + SCTP = "SCTP" + """SCTP(Streaming Control Transmission Protocol) Protocol.""" + + +class LockConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Lock Configuration State.""" + + ENABLED = "Enabled" + """LockConfigurationState Enabled.""" + DISABLED = "Disabled" + """LockConfigurationState Disabled.""" + + +class ManagedServiceIdentitySelectorType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of managed identity.""" + + SYSTEM_ASSIGNED_IDENTITY = "SystemAssignedIdentity" + """System Assigned Identity.""" + USER_ASSIGNED_IDENTITY = "UserAssignedIdentity" + """User Assigned Identity.""" + + +class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of managed service identity (where both SystemAssigned and UserAssigned types are + allowed). + """ + + NONE = "None" + """No managed identity.""" + SYSTEM_ASSIGNED = "SystemAssigned" + """System assigned managed identity.""" + USER_ASSIGNED = "UserAssigned" + """User assigned managed identity.""" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + """System and user assigned managed identity.""" + + +class MicroBfdState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state.""" + + ENABLED = "Enabled" + """MicroBfdState-Enabled.""" + DISABLED = "Disabled" + """MicroBfdState-Disabled.""" + + +class NetworkDeviceRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """NetworkDeviceRole is the device role: Example: CE | ToR.""" + + CE = "CE" + """NetworkDeviceRole-CE(Customer Edge).""" + TO_R = "ToR" + """NetworkDeviceRole-ToR(top of rack).""" + NPB = "NPB" + """NetworkDeviceRole-NPB(Network Packet Broker).""" + TS = "TS" + """NetworkDeviceRole-TS(Terminal Server).""" + MANAGEMENT = "Management" + """NetworkDeviceRole-Management.""" + + +class NetworkDeviceRoleName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Available roles for the network device.""" + + CE = "CE" + """NetworkDeviceRoleName-CE(Customer Edge).""" + TO_R = "ToR" + """NetworkDeviceRoleName-ToR(top of rack).""" + NPB = "NPB" + """NetworkDeviceRoleName-NPB(Network Packet Broker).""" + TS = "TS" + """NetworkDeviceRoleName-TS(Terminal Server).""" + MANAGEMENT = "Management" + """NetworkDeviceRoleName-Management.""" + + +class NetworkFabricLockAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network fabric lock action.""" + + LOCK = "Lock" + """Perform lock operation.""" + UNLOCK = "Unlock" + """Perform unlock operation.""" + + +class NetworkFabricLockType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network fabric lock type.""" + + ADMINISTRATIVE = "Administrative" + """A administrative lock/unlock operation will be performed.""" + CONFIGURATION = "Configuration" + """A lock/unlock operation will be performed on the configuration.""" + + +class NetworkFabricUpgradeAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Action to be performed while upgrading the fabric.""" + + START = "Start" + """UpgradeAction-Start.""" + COMPLETE = "Complete" + """UpgradeAction -Complete.""" + + +class NetworkRackType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network Rack SKU name.""" + + AGGREGATE = "Aggregate" + """NetworkRackType-Aggregate.""" + COMPUTE = "Compute" + """NetworkRackType-Compute.""" + COMBINED = "Combined" + """NetworkRackType-Combined.""" + + +class NfcSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Network Fabric Controller SKU.""" + + BASIC = "Basic" + """NfcSku-Basic.""" + STANDARD = "Standard" + """NfcSku-Standard.""" + HIGH_PERFORMANCE = "HighPerformance" + """NfcSku-HighPerformance.""" + + +class NNIDerivedUniqueRouteDistinguisherConfigurationState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """NNI Derived Unique Route Distinguisher Configuration State.""" + + ENABLED = "Enabled" + """NNI derived unique route distinguisher configuration state Enabled.""" + DISABLED = "Disabled" + """NNI derived unique route distinguisher configuration state Disabled.""" + + +class NniType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of NNI used. Example: CE | NPB.""" + + CE = "CE" + """NniType-CE(Customer Edge).""" + NPB = "NPB" + """NniType-NPB(Network Packet Broker).""" + + +class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is "user,system". + """ + + USER = "user" + """Indicates the operation is initiated by a user.""" + SYSTEM = "system" + """Indicates the operation is initiated by a system.""" + USER_SYSTEM = "user,system" + """Indicates the operation is initiated by a user or system.""" + + +class PeeringOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Peering option list.""" + + OPTION_A = "OptionA" + """PeeringOption-OptionA.""" + OPTION_B = "OptionB" + """PeeringOption-OptionB.""" + + +class PollingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Polling type.""" + + PULL = "Pull" + """PollingType-Pull.""" + PUSH = "Push" + """PollingType-Push.""" + + +class PortType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Port type that needs to be matched.""" + + SOURCE_PORT = "SourcePort" + """PortType SourcePort.""" + DESTINATION_PORT = "DestinationPort" + """PortType DestinationPort.""" + BIDIRECTIONAL = "Bidirectional" + """PortType Bidirectional.""" + + +class PrefixType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IP Prefix Type that needs to be matched.""" + + PREFIX = "Prefix" + """PrefixType Prefix.""" + LONGEST_PREFIX = "LongestPrefix" + """PrefixType LongestPrefix.""" + + +class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state.""" + + ACCEPTED = "Accepted" + """Accepted Provisioning State.""" + SUCCEEDED = "Succeeded" + """Succeeded Provisioning State.""" + UPDATING = "Updating" + """Updating Provisioning State.""" + DELETING = "Deleting" + """Deleting Provisioning State.""" + FAILED = "Failed" + """Failed Provisioning State.""" + CANCELED = "Canceled" + """Canceled Provisioning State.""" + + +class QosConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """NetworkFabric QoS ConfigurationState.""" + + DISABLED = "Disabled" + """QosConfigurationState-Disabled.""" + ENABLED = "Enabled" + """QosConfigurationState-Enabled.""" + + +class RebootType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of reboot to be performed. Example: GracefulRebootWithZTP.""" + + GRACEFUL_REBOOT_WITH_ZTP = "GracefulRebootWithZTP" + """RebootType GracefulRebootWithZTP.""" + GRACEFUL_REBOOT_WITHOUT_ZTP = "GracefulRebootWithoutZTP" + """RebootType GracefulRebootWithoutZTP.""" + UNGRACEFUL_REBOOT_WITH_ZTP = "UngracefulRebootWithZTP" + """RebootType UngracefulRebootWithZTP.""" + UNGRACEFUL_REBOOT_WITHOUT_ZTP = "UngracefulRebootWithoutZTP" + """RebootType UngracefulRebootWithoutZTP.""" + + +class RedistributeConnectedSubnets(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Advertise Connected Subnets. Ex: "True" | "False".""" + + TRUE = "True" + """RedistributeConnectedSubnets-True.""" + FALSE = "False" + """RedistributeConnectedSubnets-False.""" + + +class RedistributeStaticRoutes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Advertise Static Routes. Ex: "True" | "False".""" + + TRUE = "True" + """RedistributeStaticRoutes-True.""" + FALSE = "False" + """RedistributeStaticRoutes-False.""" + + +class RoutePolicyActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Action type. Example: Permit | Deny | Continue.""" + + PERMIT = "Permit" + """RoutePolicyActionType-Permit.""" + DENY = "Deny" + """RoutePolicyActionType-Deny.""" + CONTINUE = "Continue" + """RoutePolicyActionType-Continue.""" + + +class RoutePolicyConditionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of the condition used.""" + + OR = "Or" + """RoutePolicyConditionType-Or.""" + AND = "And" + """RoutePolicyConditionType-And.""" + + +class RouteType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Route type to be used.""" + + STATIC = "Static" + """RouteType-Static.""" + OPTION_A = "OptionA" + """RouteType-OptionA.""" + + +class RuleCondition(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify Rule condition.""" + + AND = "And" + """And Rule-Condition.""" + OR = "Or" + """Or Rule-Condition.""" + + +class SourceDestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IP Address type that needs to be matched.""" + + SOURCE_IP = "SourceIP" + """SourceDestinationType SourceIP.""" + DESTINATION_IP = "DestinationIP" + """SourceDestinationType DestinationIP.""" + BIDIRECTIONAL = "Bidirectional" + """SourceDestinationType Bidirectional.""" + + +class StationConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Station Configuration State.""" + + ENABLED = "Enabled" + """StationConfigurationState Enabled.""" + DISABLED = "Disabled" + """StationConfigurationState Disabled.""" + + +class StationConnectionMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Station Connection Mode.""" + + ACTIVE = "Active" + """StationConnectionMode Active.""" + PASSIVE = "Passive" + """StationConnectionMode Passive.""" + + +class SynchronizationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Synchronization status of a secret or certificate for a device (Network Device or Terminal + Server). Whether the device has been configured with the latest version of the secret or + certificate. + """ + + IN_SYNC = "InSync" + """The device has been configured with the latest version of the secret.""" + SYNCHRONIZING = "Synchronizing" + """The device is being reconfigured with the latest version of the secret. + + While in this state, the secret archive reference may not match the secret configured on the + device.""" + OUT_OF_SYNC = "OutOfSync" + """The device has not been configured with the latest version of the secret.""" + + +class TapRuleActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of actions that can be performed.""" + + DROP = "Drop" + """TapRuleActionType-Drop.""" + COUNT = "Count" + """TapRuleActionType-Count.""" + LOG = "Log" + """TapRuleActionType-Log.""" + REPLICATE = "Replicate" + """TapRuleActionType-Replicate.""" + GOTO = "Goto" + """TapRuleActionType-Goto.""" + REDIRECT = "Redirect" + """TapRuleActionType-Redirect.""" + MIRROR = "Mirror" + """TapRuleActionType-Mirror.""" + + +class UniqueRouteDistinguisherConfigurationState( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Unique Route Distinguisher Configuration State.""" + + ENABLED = "Enabled" + """UniqueRouteDistinguisherConfigurationState Enabled.""" + DISABLED = "Disabled" + """UniqueRouteDistinguisherConfigurationState Disabled.""" + + +class V4OverV6BgpSessionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """V4 over V6 BGP session state.""" + + ENABLED = "Enabled" + """V4OverV6BgpSessionState-Enabled.""" + DISABLED = "Disabled" + """V4OverV6BgpSessionState-Disabled.""" + + +class V6OverV4BgpSessionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """V6 over V4 BGP session state.""" + + ENABLED = "Enabled" + """V6OverV4BgpSessionState-Enabled.""" + DISABLED = "Disabled" + """V6OverV4BgpSessionState-Disabled.""" + + +class ValidateAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Validate action that to be performed.""" + + CABLING = "Cabling" + """ValidateAction-Cabling.""" + CONFIGURATION = "Configuration" + """ValidateAction-Configuration.""" + CONNECTIVITY = "Connectivity" + """ValidateAction-Connectivity.""" + + +class WellKnownCommunities(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """``Internet`` - Advertise routes to internet community. ``LocalAS`` - Advertise routes to only + localAS peers. ``NoAdvertise`` - Don't advertise routes to any peer. ``NoExport`` - Don't + export to next AS. ``GShut`` - Graceful Shutdown (GSHUT) withdraw routes before terminating BGP + connection. + """ + + INTERNET = "Internet" + """WellKnownCommunities-Internet.""" + LOCAL_AS = "LocalAS" + """WellKnownCommunities-LocalAS.""" + NO_ADVERTISE = "NoAdvertise" + """WellKnownCommunities-NoAdvertise.""" + NO_EXPORT = "NoExport" + """WellKnownCommunities-NoExport.""" + G_SHUT = "GShut" + """WellKnownCommunities-GShut.""" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py deleted file mode 100644 index 2821649178bd..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_managed_network_fabric_mgmt_client_enums.py +++ /dev/null @@ -1,409 +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 enum import Enum -from azure.core import CaseInsensitiveEnumMeta - - -class AclActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of actions that can be performed.""" - - DROP = "Drop" - COUNT = "Count" - LOG = "Log" - - -class Action(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specify action.""" - - ALLOW = "Allow" - DENY = "Deny" - - -class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.""" - - INTERNAL = "Internal" - - -class AddressFamilyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy.""" - - I_PV4 = "IPv4" - I_PV6 = "IPv6" - - -class AdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """State defined to represent administrative actions or post actions on a particular resource.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - MAT = "MAT" - RMA = "RMA" - - -class AllowASOverride(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enable Or Disable state.""" - - ENABLE = "Enable" - DISABLE = "Disable" - - -class BfdAdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Administrative state of the BfdConfiguration. Example: Enabled | Disabled.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - MAT = "MAT" - RMA = "RMA" - - -class BooleanEnumProperty(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Boolean Enum. Example- True/False.""" - - TRUE = "True" - FALSE = "False" - - -class CommunityActionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """community action types. Example: Permit | Deny.""" - - PERMIT = "Permit" - DENY = "Deny" - - -class Condition(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specify prefix-list bounds.""" - - EQUAL_TO = "EqualTo" - GREATER_THAN_OR_EQUAL_TO = "GreaterThanOrEqualTo" - LESSER_THAN_OR_EQUAL_TO = "LesserThanOrEqualTo" - RANGE = "Range" - - -class ConfigurationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Configuration state for the resource.""" - - SUCCEEDED = "Succeeded" - FAILED = "Failed" - REJECTED = "Rejected" - ACCEPTED = "Accepted" - PROVISIONED = "Provisioned" - ERROR_PROVISIONING = "ErrorProvisioning" - DEPROVISIONING = "Deprovisioning" - DEPROVISIONED = "Deprovisioned" - ERROR_DEPROVISIONING = "ErrorDeprovisioning" - DEFERRED_CONTROL = "DeferredControl" - PROVISIONING = "Provisioning" - PENDING_COMMIT = "PendingCommit" - - -class ConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Input method to configure Access Control List.""" - - FILE = "File" - INLINE = "Inline" - - -class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" - - USER = "User" - APPLICATION = "Application" - MANAGED_IDENTITY = "ManagedIdentity" - KEY = "Key" - - -class DestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of destination. Input can be IsolationDomain or Direct.""" - - ISOLATION_DOMAIN = "IsolationDomain" - DIRECT = "Direct" - - -class DeviceAdministrativeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Administrative state.""" - - RMA = "RMA" - RESYNC = "Resync" - GRACEFUL_QUARANTINE = "GracefulQuarantine" - QUARANTINE = "Quarantine" - - -class EnableDisableState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Administrative state.""" - - ENABLE = "Enable" - DISABLE = "Disable" - - -class Encapsulation(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of encapsulation.""" - - NONE = "None" - GRE = "GRE" - - -class EncapsulationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Encapsulation Type that needs to be matched.""" - - NONE = "None" - GT_PV1 = "GTPv1" - - -class Extension(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Extension. Example: NoExtension | NPB.""" - - NO_EXTENSION = "NoExtension" - NPB = "NPB" - - -class FabricSkuType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of Network Fabric SKU.""" - - SINGLE_RACK = "SingleRack" - MULTI_RACK = "MultiRack" - - -class GatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Gateway Type of the resource.""" - - INFRASTRUCTURE = "Infrastructure" - WORKLOAD = "Workload" - - -class InterfaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The Interface Type. Example: Management/Data.""" - - MANAGEMENT = "Management" - DATA = "Data" - - -class IPAddressType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IP Address type.""" - - I_PV4 = "IPv4" - I_PV6 = "IPv6" - - -class IsManagementType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Configuration to use NNI for Infrastructure Management. Example: True/False.""" - - TRUE = "True" - FALSE = "False" - - -class IsMonitoringEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """To check whether monitoring of internal network is enabled or not.""" - - TRUE = "True" - FALSE = "False" - - -class IsWorkloadManagementNetworkEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """A workload management network is required for all the tenant (workload) traffic. This traffic - is only dedicated for Tenant workloads which are required to access internet or any other - MSFT/Public endpoints. - """ - - TRUE = "True" - FALSE = "False" - - -class Layer4Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Layer4 protocol type that needs to be matched.""" - - TCP = "TCP" - UDP = "UDP" - - -class NetworkDeviceRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """NetworkDeviceRole is the device role: Example: CE | ToR.""" - - CE = "CE" - TO_R = "ToR" - NPB = "NPB" - TS = "TS" - MANAGEMENT = "Management" - - -class NetworkDeviceRoleName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Available roles for the network device.""" - - CE = "CE" - TO_R = "ToR" - NPB = "NPB" - TS = "TS" - MANAGEMENT = "Management" - - -class NetworkFabricUpgradeAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Action to be performed while upgrading the fabric.""" - - START = "Start" - COMPLETE = "Complete" - - -class NetworkRackType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Network Rack SKU name.""" - - AGGREGATE = "Aggregate" - COMPUTE = "Compute" - COMBINED = "Combined" - - -class NfcSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Network Fabric Controller SKU.""" - - BASIC = "Basic" - STANDARD = "Standard" - HIGH_PERFORMANCE = "HighPerformance" - - -class NniType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of NNI used. Example: CE | NPB.""" - - CE = "CE" - NPB = "NPB" - - -class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit - logs UX. Default value is "user,system". - """ - - USER = "user" - SYSTEM = "system" - USER_SYSTEM = "user,system" - - -class PeeringOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Peering option list.""" - - OPTION_A = "OptionA" - OPTION_B = "OptionB" - - -class PollingIntervalInSeconds(int, Enum, metaclass=CaseInsensitiveEnumMeta): - """Polling interval in seconds.""" - - THIRTY = 30 - SIXTY = 60 - NINETY = 90 - ONE_HUNDRED_TWENTY = 120 - - -class PollingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Polling type.""" - - PULL = "Pull" - PUSH = "Push" - - -class PortType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Port type that needs to be matched.""" - - SOURCE_PORT = "SourcePort" - DESTINATION_PORT = "DestinationPort" - - -class PrefixType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IP Prefix Type that needs to be matched.""" - - PREFIX = "Prefix" - LONGEST_PREFIX = "LongestPrefix" - - -class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current provisioning state.""" - - ACCEPTED = "Accepted" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - DELETING = "Deleting" - FAILED = "Failed" - CANCELED = "Canceled" - - -class RebootType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of reboot to be performed. Example: GracefulRebootWithZTP.""" - - GRACEFUL_REBOOT_WITH_ZTP = "GracefulRebootWithZTP" - GRACEFUL_REBOOT_WITHOUT_ZTP = "GracefulRebootWithoutZTP" - UNGRACEFUL_REBOOT_WITH_ZTP = "UngracefulRebootWithZTP" - UNGRACEFUL_REBOOT_WITHOUT_ZTP = "UngracefulRebootWithoutZTP" - - -class RedistributeConnectedSubnets(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Advertise Connected Subnets. Ex: "True" | "False".""" - - TRUE = "True" - FALSE = "False" - - -class RedistributeStaticRoutes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Advertise Static Routes. Ex: "True" | "False".""" - - TRUE = "True" - FALSE = "False" - - -class RoutePolicyActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Action type. Example: Permit | Deny | Continue.""" - - PERMIT = "Permit" - DENY = "Deny" - CONTINUE = "Continue" - - -class RoutePolicyConditionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of the condition used.""" - - OR = "Or" - AND = "And" - - -class SourceDestinationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """IP Address type that needs to be matched.""" - - SOURCE_IP = "SourceIP" - DESTINATION_IP = "DestinationIP" - - -class TapRuleActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of actions that can be performed.""" - - DROP = "Drop" - COUNT = "Count" - LOG = "Log" - REPLICATE = "Replicate" - GOTO = "Goto" - REDIRECT = "Redirect" - MIRROR = "Mirror" - - -class ValidateAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Validate action that to be performed.""" - - CABLING = "Cabling" - CONFIGURATION = "Configuration" - CONNECTIVITY = "Connectivity" - - -class WellKnownCommunities(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """``Internet`` - Advertise routes to internet community. ``LocalAS`` - Advertise routes to only - localAS peers. ``NoAdvertise`` - Don't advertise routes to any peer. ``NoExport`` - Don't - export to next AS. ``GShut`` - Graceful Shutdown (GSHUT) withdraw routes before terminating BGP - connection. - """ - - INTERNET = "Internet" - LOCAL_AS = "LocalAS" - NO_ADVERTISE = "NoAdvertise" - NO_EXPORT = "NoExport" - G_SHUT = "GShut" diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models.py new file mode 100644 index 000000000000..f872d3569b04 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models.py @@ -0,0 +1,19844 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_field + +if TYPE_CHECKING: + from .. import models as _models + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlList(TrackedResource): + """The Access Control List resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The Access ControlList properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.AccessControlListProperties + """ + + properties: "_models.AccessControlListProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Access ControlList properties. Required.""" + + __flattened_items = [ + "annotation", + "configuration_type", + "acls_url", + "default_action", + "match_configurations", + "dynamic_match_configurations", + "last_synced_time", + "acl_type", + "device_role", + "global_access_control_list_actions", + "last_operation", + "network_fabric_ids", + "control_plane_acl_configuration", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.AccessControlListProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AccessControlListAction(_Model): + """Action that need to performed. + + :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", + "Remark", and "PoliceRate". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.AclActionType + :ivar counter_name: Name of the counter block to get match count information. + :vartype counter_name: str + :ivar remark_comment: Remark comment. + :vartype remark_comment: str + :ivar police_rate_configuration: Police rate configuration. + :vartype police_rate_configuration: + ~azure.mgmt.managednetworkfabric.models.PoliceRateConfigurationProperties + """ + + type: Optional[Union[str, "_models.AclActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Drop\", \"Count\", \"Log\", + \"Remark\", and \"PoliceRate\".""" + counter_name: Optional[str] = rest_field( + name="counterName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the counter block to get match count information.""" + remark_comment: Optional[str] = rest_field( + name="remarkComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Remark comment.""" + police_rate_configuration: Optional["_models.PoliceRateConfigurationProperties"] = rest_field( + name="policeRateConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Police rate configuration.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.AclActionType"]] = None, + counter_name: Optional[str] = None, + remark_comment: Optional[str] = None, + police_rate_configuration: Optional["_models.PoliceRateConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListActionPatch(_Model): + """Action that need to be performed. + + :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", + "Remark", and "PoliceRate". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.AclActionType + :ivar counter_name: Name of the counter block to get match count information. + :vartype counter_name: str + :ivar remark_comment: Remark comment. + :vartype remark_comment: str + :ivar police_rate_configuration: Police rate configuration. + :vartype police_rate_configuration: + ~azure.mgmt.managednetworkfabric.models.PoliceRateConfigurationProperties + """ + + type: Optional[Union[str, "_models.AclActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Drop\", \"Count\", \"Log\", + \"Remark\", and \"PoliceRate\".""" + counter_name: Optional[str] = rest_field( + name="counterName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the counter block to get match count information.""" + remark_comment: Optional[str] = rest_field( + name="remarkComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Remark comment.""" + police_rate_configuration: Optional["_models.PoliceRateConfigurationProperties"] = rest_field( + name="policeRateConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Police rate configuration.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.AclActionType"]] = None, + counter_name: Optional[str] = None, + remark_comment: Optional[str] = None, + police_rate_configuration: Optional["_models.PoliceRateConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonMatchConditions(_Model): + """Defines the common match conditions of the ACL and Network Tap Rule. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition + """ + + protocol_types: Optional[list[str]] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the protocols that need to be matched.""" + vlan_match_condition: Optional["_models.VlanMatchCondition"] = rest_field( + name="vlanMatchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Vlan match condition that needs to be matched.""" + ip_condition: Optional["_models.IpMatchCondition"] = rest_field( + name="ipCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """IP condition that needs to be matched.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, + ip_condition: Optional["_models.IpMatchCondition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListMatchCondition(CommonMatchConditions): + """Defines the match condition that is supported to filter the traffic. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition + :ivar ether_types: List of ether type values that need to be matched. + :vartype ether_types: list[str] + :ivar fragments: List of IP fragment packets that need to be matched. + :vartype fragments: list[str] + :ivar ip_lengths: List of IP Lengths that need to be matched. + :vartype ip_lengths: list[str] + :ivar ttl_values: List of TTL [Time To Live] values that need to be matched. + :vartype ttl_values: list[str] + :ivar dscp_markings: List of DSCP Markings that need to be matched. + :vartype dscp_markings: list[str] + :ivar protocol_neighbors: Protocol neighbors that need to be matched. + :vartype protocol_neighbors: list[str] + :ivar port_condition: Defines the port condition that needs to be matched. + :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition + :ivar icmp_configuration: Internet Control Message Protocol (ICMP) configuration. + :vartype icmp_configuration: + ~azure.mgmt.managednetworkfabric.models.IcmpConfigurationProperties + """ + + ether_types: Optional[list[str]] = rest_field( + name="etherTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ether type values that need to be matched.""" + fragments: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP fragment packets that need to be matched.""" + ip_lengths: Optional[list[str]] = rest_field( + name="ipLengths", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Lengths that need to be matched.""" + ttl_values: Optional[list[str]] = rest_field( + name="ttlValues", visibility=["read", "create", "update", "delete", "query"] + ) + """List of TTL [Time To Live] values that need to be matched.""" + dscp_markings: Optional[list[str]] = rest_field( + name="dscpMarkings", visibility=["read", "create", "update", "delete", "query"] + ) + """List of DSCP Markings that need to be matched.""" + protocol_neighbors: Optional[list[str]] = rest_field( + name="protocolNeighbors", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol neighbors that need to be matched.""" + port_condition: Optional["_models.AccessControlListPortCondition"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the port condition that needs to be matched.""" + icmp_configuration: Optional["_models.IcmpConfigurationProperties"] = rest_field( + name="icmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) configuration.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, + ip_condition: Optional["_models.IpMatchCondition"] = None, + ether_types: Optional[list[str]] = None, + fragments: Optional[list[str]] = None, + ip_lengths: Optional[list[str]] = None, + ttl_values: Optional[list[str]] = None, + dscp_markings: Optional[list[str]] = None, + protocol_neighbors: Optional[list[str]] = None, + port_condition: Optional["_models.AccessControlListPortCondition"] = None, + icmp_configuration: Optional["_models.IcmpConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonMatchConditionsPatch(_Model): + """Defines the common match conditions of the ACL and Network Tap Rule. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchConditionPatch + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchConditionPatch + """ + + protocol_types: Optional[list[str]] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the protocols that need to be matched.""" + vlan_match_condition: Optional["_models.VlanMatchConditionPatch"] = rest_field( + name="vlanMatchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Vlan match condition that needs to be matched.""" + ip_condition: Optional["_models.IpMatchConditionPatch"] = rest_field( + name="ipCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """IP condition that needs to be matched.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchConditionPatch"] = None, + ip_condition: Optional["_models.IpMatchConditionPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListMatchConditionPatch(CommonMatchConditionsPatch): + """Defines the match condition that is supported to filter the traffic. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchConditionPatch + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchConditionPatch + :ivar ether_types: List of ether type values that need to be matched. + :vartype ether_types: list[str] + :ivar fragments: List of IP fragment packets that need to be matched. + :vartype fragments: list[str] + :ivar ip_lengths: List of IP Lengths that need to be matched. + :vartype ip_lengths: list[str] + :ivar ttl_values: List of TTL [Time To Live] values that need to be matched. + :vartype ttl_values: list[str] + :ivar dscp_markings: List of DSCP Markings that need to be matched. + :vartype dscp_markings: list[str] + :ivar port_condition: Defines the port condition that needs to be matched. + :vartype port_condition: + ~azure.mgmt.managednetworkfabric.models.AccessControlListPortConditionPatch + :ivar protocol_neighbors: Protocol neighbors that need to be matched. + :vartype protocol_neighbors: list[str] + :ivar icmp_configuration: Internet Control Message Protocol (ICMP) configuration. + :vartype icmp_configuration: + ~azure.mgmt.managednetworkfabric.models.IcmpConfigurationPatchProperties + """ + + ether_types: Optional[list[str]] = rest_field( + name="etherTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ether type values that need to be matched.""" + fragments: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP fragment packets that need to be matched.""" + ip_lengths: Optional[list[str]] = rest_field( + name="ipLengths", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Lengths that need to be matched.""" + ttl_values: Optional[list[str]] = rest_field( + name="ttlValues", visibility=["read", "create", "update", "delete", "query"] + ) + """List of TTL [Time To Live] values that need to be matched.""" + dscp_markings: Optional[list[str]] = rest_field( + name="dscpMarkings", visibility=["read", "create", "update", "delete", "query"] + ) + """List of DSCP Markings that need to be matched.""" + port_condition: Optional["_models.AccessControlListPortConditionPatch"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the port condition that needs to be matched.""" + protocol_neighbors: Optional[list[str]] = rest_field( + name="protocolNeighbors", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocol neighbors that need to be matched.""" + icmp_configuration: Optional["_models.IcmpConfigurationPatchProperties"] = rest_field( + name="icmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) configuration.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchConditionPatch"] = None, + ip_condition: Optional["_models.IpMatchConditionPatch"] = None, + ether_types: Optional[list[str]] = None, + fragments: Optional[list[str]] = None, + ip_lengths: Optional[list[str]] = None, + ttl_values: Optional[list[str]] = None, + dscp_markings: Optional[list[str]] = None, + port_condition: Optional["_models.AccessControlListPortConditionPatch"] = None, + protocol_neighbors: Optional[list[str]] = None, + icmp_configuration: Optional["_models.IcmpConfigurationPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListMatchConfiguration(_Model): + """Defines the match configuration that are supported to filter the traffic. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration. + :vartype sequence_number: int + :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_conditions: List of the match conditions. + :vartype match_conditions: + list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition] + :ivar actions: List of actions that need to be performed for the matched conditions. + :vartype actions: list[~azure.mgmt.managednetworkfabric.models.AccessControlListAction] + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration.""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of IP Address. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_conditions: Optional[list["_models.AccessControlListMatchCondition"]] = rest_field( + name="matchConditions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the match conditions.""" + actions: Optional[list["_models.AccessControlListAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of actions that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_conditions: Optional[list["_models.AccessControlListMatchCondition"]] = None, + actions: Optional[list["_models.AccessControlListAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListMatchConfigurationPatch(_Model): + """Defines the match configuration that are supported to filter the traffic. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration. + :vartype sequence_number: int + :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_conditions: List of the match conditions. + :vartype match_conditions: + list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConditionPatch] + :ivar actions: List of actions that need to be performed for the matched conditions. + :vartype actions: list[~azure.mgmt.managednetworkfabric.models.AccessControlListActionPatch] + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration.""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of IP Address. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_conditions: Optional[list["_models.AccessControlListMatchConditionPatch"]] = rest_field( + name="matchConditions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the match conditions.""" + actions: Optional[list["_models.AccessControlListActionPatch"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of actions that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_conditions: Optional[list["_models.AccessControlListMatchConditionPatch"]] = None, + actions: Optional[list["_models.AccessControlListActionPatch"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagsUpdate(_Model): + """Base tracked resource type for PATCH updates. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListPatch(TagsUpdate): + """The Access Control Lists patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Access Control Lists patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatchProperties + """ + + properties: Optional["_models.AccessControlListPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control Lists patch properties.""" + + __flattened_items = [ + "configuration_type", + "acls_url", + "default_action", + "match_configurations", + "dynamic_match_configurations", + "control_plane_acl_configuration", + "acl_type", + "device_role", + "global_access_control_list_actions", + "annotation", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.AccessControlListPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AccessControlListPatchProperties(_Model): + """Access Control Lists patch properties. + + :ivar configuration_type: Input method to configure Access Control List. Known values are: + "File" and "Inline". + :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType + :ivar acls_url: Access Control List file URL. + :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar match_configurations: List of match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfigurationPatch] + :ivar dynamic_match_configurations: List of dynamic match configurations. + :vartype dynamic_match_configurations: + list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch] + :ivar control_plane_acl_configuration: Access Control List (ACL) configurations. + :vartype control_plane_acl_configuration: + list[~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPatchProperties] + :ivar acl_type: Access Control List (ACL) Type. Known values are: "ControlPlaneTrafficPolicy", + "Tenant", "Management", and "ControlPlaneAcl". + :vartype acl_type: str or ~azure.mgmt.managednetworkfabric.models.AclType + :ivar device_role: Device Role. Known values are: "CE", "ToR", "NPB", and "ManagementSwitch". + :vartype device_role: str or ~azure.mgmt.managednetworkfabric.models.DeviceRole + :ivar global_access_control_list_actions: Global Access Control List (ACL) actions. + :vartype global_access_control_list_actions: + ~azure.mgmt.managednetworkfabric.models.GlobalAccessControlListActionPatchProperties + :ivar annotation: Switch configuration description. + :vartype annotation: str + """ + + configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = rest_field( + name="configurationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Input method to configure Access Control List. Known values are: \"File\" and \"Inline\".""" + acls_url: Optional[str] = rest_field(name="aclsUrl", visibility=["read", "create", "update", "delete", "query"]) + """Access Control List file URL.""" + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = rest_field( + name="defaultAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + Known values are: \"Permit\" and \"Deny\".""" + match_configurations: Optional[list["_models.AccessControlListMatchConfigurationPatch"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of match configurations.""" + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfigurationPatch"]] = rest_field( + name="dynamicMatchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of dynamic match configurations.""" + control_plane_acl_configuration: Optional[list["_models.ControlPlaneAclPatchProperties"]] = rest_field( + name="controlPlaneAclConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) configurations.""" + acl_type: Optional[Union[str, "_models.AclType"]] = rest_field( + name="aclType", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) Type. Known values are: \"ControlPlaneTrafficPolicy\", \"Tenant\", + \"Management\", and \"ControlPlaneAcl\".""" + device_role: Optional[Union[str, "_models.DeviceRole"]] = rest_field( + name="deviceRole", visibility=["read", "create", "update", "delete", "query"] + ) + """Device Role. Known values are: \"CE\", \"ToR\", \"NPB\", and \"ManagementSwitch\".""" + global_access_control_list_actions: Optional["_models.GlobalAccessControlListActionPatchProperties"] = rest_field( + name="globalAccessControlListActions", visibility=["read", "create", "update", "delete", "query"] + ) + """Global Access Control List (ACL) actions.""" + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + + @overload + def __init__( + self, + *, + configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, + acls_url: Optional[str] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfigurationPatch"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfigurationPatch"]] = None, + control_plane_acl_configuration: Optional[list["_models.ControlPlaneAclPatchProperties"]] = None, + acl_type: Optional[Union[str, "_models.AclType"]] = None, + device_role: Optional[Union[str, "_models.DeviceRole"]] = None, + global_access_control_list_actions: Optional["_models.GlobalAccessControlListActionPatchProperties"] = None, + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortCondition(_Model): + """Port condition that needs to be matched. + + :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort", + "DestinationPort", and "Bidirectional". + :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType + :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values + are: "TCP", "UDP", and "SCTP". + :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol + :ivar ports: List of the Ports that need to be matched. + :vartype ports: list[str] + :ivar port_group_names: List of the port Group Names that need to be matched. + :vartype port_group_names: list[str] + """ + + port_type: Optional[Union[str, "_models.PortType"]] = rest_field( + name="portType", visibility=["read", "create", "update", "delete", "query"] + ) + """Port type that needs to be matched. Known values are: \"SourcePort\", \"DestinationPort\", and + \"Bidirectional\".""" + layer4_protocol: Union[str, "_models.Layer4Protocol"] = rest_field( + name="layer4Protocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Layer4 protocol type that needs to be matched. Required. Known values are: \"TCP\", \"UDP\", + and \"SCTP\".""" + ports: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of the Ports that need to be matched.""" + port_group_names: Optional[list[str]] = rest_field( + name="portGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the port Group Names that need to be matched.""" + + @overload + def __init__( + self, + *, + layer4_protocol: Union[str, "_models.Layer4Protocol"], + port_type: Optional[Union[str, "_models.PortType"]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListPortCondition(PortCondition): + """Defines the port condition that needs to be matched. + + :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort", + "DestinationPort", and "Bidirectional". + :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType + :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values + are: "TCP", "UDP", and "SCTP". + :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol + :ivar ports: List of the Ports that need to be matched. + :vartype ports: list[str] + :ivar port_group_names: List of the port Group Names that need to be matched. + :vartype port_group_names: list[str] + :ivar flags: List of protocol flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, + not-rst, not-syn, not-urg, psh, rst, syn, urg. + :vartype flags: list[str] + """ + + flags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of protocol flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, + not-rst, not-syn, not-urg, psh, rst, syn, urg.""" + + @overload + def __init__( + self, + *, + layer4_protocol: Union[str, "_models.Layer4Protocol"], + port_type: Optional[Union[str, "_models.PortType"]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, + flags: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortConditionPatch(_Model): + """Port condition that needs to be matched. + + :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort", + "DestinationPort", and "Bidirectional". + :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType + :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Known values are: "TCP", + "UDP", and "SCTP". + :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol + :ivar ports: List of the Ports that need to be matched. + :vartype ports: list[str] + :ivar port_group_names: List of the port Group Names that need to be matched. + :vartype port_group_names: list[str] + """ + + port_type: Optional[Union[str, "_models.PortType"]] = rest_field( + name="portType", visibility=["read", "create", "update", "delete", "query"] + ) + """Port type that needs to be matched. Known values are: \"SourcePort\", \"DestinationPort\", and + \"Bidirectional\".""" + layer4_protocol: Optional[Union[str, "_models.Layer4Protocol"]] = rest_field( + name="layer4Protocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Layer4 protocol type that needs to be matched. Known values are: \"TCP\", \"UDP\", and + \"SCTP\".""" + ports: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of the Ports that need to be matched.""" + port_group_names: Optional[list[str]] = rest_field( + name="portGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the port Group Names that need to be matched.""" + + @overload + def __init__( + self, + *, + port_type: Optional[Union[str, "_models.PortType"]] = None, + layer4_protocol: Optional[Union[str, "_models.Layer4Protocol"]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListPortConditionPatch(PortConditionPatch): + """Defines the port condition that needs to be matched. + + :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort", + "DestinationPort", and "Bidirectional". + :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType + :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Known values are: "TCP", + "UDP", and "SCTP". + :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol + :ivar ports: List of the Ports that need to be matched. + :vartype ports: list[str] + :ivar port_group_names: List of the port Group Names that need to be matched. + :vartype port_group_names: list[str] + :ivar flags: List of protocol flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, + not-rst, not-syn, not-urg, psh, rst, syn, urg. + :vartype flags: list[str] + """ + + flags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of protocol flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, fin, not-ack, not-fin, not-psh, + not-rst, not-syn, not-urg, psh, rst, syn, urg.""" + + @overload + def __init__( + self, + *, + port_type: Optional[Union[str, "_models.PortType"]] = None, + layer4_protocol: Optional[Union[str, "_models.Layer4Protocol"]] = None, + ports: Optional[list[str]] = None, + port_group_names: Optional[list[str]] = None, + flags: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AccessControlListProperties(_Model): + """Access Control List Properties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar configuration_type: Input method to configure Access Control List. Required. Known values + are: "File" and "Inline". + :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType + :ivar acls_url: Access Control List file URL. + :vartype acls_url: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar match_configurations: List of match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] + :ivar dynamic_match_configurations: List of dynamic match configurations. + :vartype dynamic_match_configurations: + list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] + :ivar last_synced_time: The last synced timestamp. + :vartype last_synced_time: ~datetime.datetime + :ivar acl_type: Access Control List (ACL) Type. Known values are: "ControlPlaneTrafficPolicy", + "Tenant", "Management", and "ControlPlaneAcl". + :vartype acl_type: str or ~azure.mgmt.managednetworkfabric.models.AclType + :ivar device_role: Device Role. Known values are: "CE", "ToR", "NPB", and "ManagementSwitch". + :vartype device_role: str or ~azure.mgmt.managednetworkfabric.models.DeviceRole + :ivar global_access_control_list_actions: Global Access Control List (ACL) actions. + :vartype global_access_control_list_actions: + ~azure.mgmt.managednetworkfabric.models.GlobalAccessControlListActionProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar network_fabric_ids: Associated Network Fabric Resource IDs. + :vartype network_fabric_ids: list[str] + :ivar control_plane_acl_configuration: Access Control List (ACL) configurations. + :vartype control_plane_acl_configuration: + list[~azure.mgmt.managednetworkfabric.models.ControlPlaneAclProperties] + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + configuration_type: Union[str, "_models.ConfigurationType"] = rest_field( + name="configurationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Input method to configure Access Control List. Required. Known values are: \"File\" and + \"Inline\".""" + acls_url: Optional[str] = rest_field(name="aclsUrl", visibility=["read", "create", "update", "delete", "query"]) + """Access Control List file URL.""" + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = rest_field( + name="defaultAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + Known values are: \"Permit\" and \"Deny\".""" + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of match configurations.""" + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = rest_field( + name="dynamicMatchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of dynamic match configurations.""" + last_synced_time: Optional[datetime.datetime] = rest_field( + name="lastSyncedTime", visibility=["read"], format="rfc3339" + ) + """The last synced timestamp.""" + acl_type: Optional[Union[str, "_models.AclType"]] = rest_field( + name="aclType", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) Type. Known values are: \"ControlPlaneTrafficPolicy\", \"Tenant\", + \"Management\", and \"ControlPlaneAcl\".""" + device_role: Optional[Union[str, "_models.DeviceRole"]] = rest_field( + name="deviceRole", visibility=["read", "create", "update", "delete", "query"] + ) + """Device Role. Known values are: \"CE\", \"ToR\", \"NPB\", and \"ManagementSwitch\".""" + global_access_control_list_actions: Optional["_models.GlobalAccessControlListActionProperties"] = rest_field( + name="globalAccessControlListActions", visibility=["read", "create", "update", "delete", "query"] + ) + """Global Access Control List (ACL) actions.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + network_fabric_ids: Optional[list[str]] = rest_field(name="networkFabricIds", visibility=["read"]) + """Associated Network Fabric Resource IDs.""" + control_plane_acl_configuration: Optional[list["_models.ControlPlaneAclProperties"]] = rest_field( + name="controlPlaneAclConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) configurations.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + configuration_type: Union[str, "_models.ConfigurationType"], + annotation: Optional[str] = None, + acls_url: Optional[str] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, + acl_type: Optional[Union[str, "_models.AclType"]] = None, + device_role: Optional[Union[str, "_models.DeviceRole"]] = None, + global_access_control_list_actions: Optional["_models.GlobalAccessControlListActionProperties"] = None, + control_plane_acl_configuration: Optional[list["_models.ControlPlaneAclProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ActionIpCommunityPatchProperties(_Model): + """IP Community Properties. + + :ivar add: List of IP Community IDs. + :vartype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + :ivar delete: List of IP Community IDs. + :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + :ivar set: List of IP Community IDs. + :vartype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + """ + + add: Optional["_models.IpCommunityIdList"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP Community IDs.""" + delete: Optional["_models.IpCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community IDs.""" + set: Optional["_models.IpCommunityIdList"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP Community IDs.""" + + @overload + def __init__( + self, + *, + add: Optional["_models.IpCommunityIdList"] = None, + delete: Optional["_models.IpCommunityIdList"] = None, + set: Optional["_models.IpCommunityIdList"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ActionIpCommunityProperties(_Model): + """IP Community Properties. + + :ivar add: List of IP Community IDs. + :vartype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + :ivar delete: List of IP Community IDs. + :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + :ivar set: List of IP Community IDs. + :vartype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList + """ + + add: Optional["_models.IpCommunityIdList"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP Community IDs.""" + delete: Optional["_models.IpCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community IDs.""" + set: Optional["_models.IpCommunityIdList"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of IP Community IDs.""" + + @overload + def __init__( + self, + *, + add: Optional["_models.IpCommunityIdList"] = None, + delete: Optional["_models.IpCommunityIdList"] = None, + set: Optional["_models.IpCommunityIdList"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ActionIpExtendedCommunityPatchProperties(_Model): + """IP Extended Community Properties. + + :ivar add: List of IP Extended Community IDs. + :vartype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + :ivar delete: List of IP Extended Community IDs. + :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + :ivar set: List of IP Extended Community IDs. + :vartype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + """ + + add: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + delete: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + set: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + + @overload + def __init__( + self, + *, + add: Optional["_models.IpExtendedCommunityIdList"] = None, + delete: Optional["_models.IpExtendedCommunityIdList"] = None, + set: Optional["_models.IpExtendedCommunityIdList"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ActionIpExtendedCommunityProperties(_Model): + """IP Extended Community Properties. + + :ivar add: List of IP Extended Community IDs. + :vartype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + :ivar delete: List of IP Extended Community IDs. + :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + :ivar set: List of IP Extended Community IDs. + :vartype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList + """ + + add: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + delete: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + set: Optional["_models.IpExtendedCommunityIdList"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community IDs.""" + + @overload + def __init__( + self, + *, + add: Optional["_models.IpExtendedCommunityIdList"] = None, + delete: Optional["_models.IpExtendedCommunityIdList"] = None, + set: Optional["_models.IpExtendedCommunityIdList"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AggregateRoute(_Model): + """aggregateIpv4Route model. + + :ivar prefix: IPv4 Prefix of the aggregate Ipv4Route. Required. + :vartype prefix: str + """ + + prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IPv4 Prefix of the aggregate Ipv4Route. Required.""" + + @overload + def __init__( + self, + *, + prefix: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AggregateRouteConfiguration(_Model): + """List of IPv4 and IPv6 aggregate routes. + + :ivar ipv4_routes: List of IPv4 Route prefixes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] + :ivar ipv6_routes: List of Ipv6Routes prefixes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] + """ + + ipv4_routes: Optional[list["_models.AggregateRoute"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Route prefixes.""" + ipv6_routes: Optional[list["_models.AggregateRoute"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Ipv6Routes prefixes.""" + + @overload + def __init__( + self, + *, + ipv4_routes: Optional[list["_models.AggregateRoute"]] = None, + ipv6_routes: Optional[list["_models.AggregateRoute"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AggregateRoutePatchConfiguration(_Model): + """List of IPv4 and IPv6 aggregate routes. + + :ivar ipv4_routes: List of IPv4 Route prefixes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] + :ivar ipv6_routes: List of Ipv6Routes prefixes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] + """ + + ipv4_routes: Optional[list["_models.AggregateRoute"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Route prefixes.""" + ipv6_routes: Optional[list["_models.AggregateRoute"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Ipv6Routes prefixes.""" + + @overload + def __init__( + self, + *, + ipv4_routes: Optional[list["_models.AggregateRoute"]] = None, + ipv6_routes: Optional[list["_models.AggregateRoute"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AnnotationResource(_Model): + """Switch configuration entries require a description to discern between configuration group. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ArmConfigurationDiffOperationResponse(_Model): + """Arm Configuration Diff Response V2. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Arm Configuration Diff Response Properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.ArmConfigurationDiffResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.ArmConfigurationDiffResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Arm Configuration Diff Response Properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.ArmConfigurationDiffResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ArmConfigurationDiffResponseProperties(_Model): + """Arm Configuration Diff Response Properties. + + :ivar configuration_diff_url: Storage URL to the diff file. + :vartype configuration_diff_url: str + """ + + configuration_diff_url: Optional[str] = rest_field( + name="configurationDiffUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Storage URL to the diff file.""" + + @overload + def __init__( + self, + *, + configuration_diff_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizedTransceiverPatchProperties(_Model): + """Authorized Transceiver Patch Properties. + + :ivar vendor: Vendor of the transceiver. + :vartype vendor: str + :ivar key: Key that must be configured on the fabric. + :vartype key: str + """ + + vendor: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Vendor of the transceiver.""" + key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Key that must be configured on the fabric.""" + + @overload + def __init__( + self, + *, + vendor: Optional[str] = None, + key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizedTransceiverProperties(_Model): + """Authorized Transceiver Properties. + + :ivar vendor: Vendor of the transceiver. + :vartype vendor: str + :ivar key: Key that must be configured on the fabric. + :vartype key: str + """ + + vendor: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Vendor of the transceiver.""" + key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Key that must be configured on the fabric.""" + + @overload + def __init__( + self, + *, + vendor: Optional[str] = None, + key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BfdConfiguration(_Model): + """BFD configuration properties. + + :ivar administrative_state: Administrative state of the BfdConfiguration. Example: Enabled | + Disabled. Known values are: "Enabled", "Disabled", "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + :ivar interval_in_milli_seconds: Interval in milliseconds. Example: 300. + :vartype interval_in_milli_seconds: int + :ivar multiplier: Multiplier for the Bfd Configuration. Example: 5. + :vartype multiplier: int + """ + + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the BfdConfiguration. Example: Enabled | Disabled. Known values are: + \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + interval_in_milli_seconds: Optional[int] = rest_field( + name="intervalInMilliSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Interval in milliseconds. Example: 300.""" + multiplier: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Multiplier for the Bfd Configuration. Example: 5.""" + + @overload + def __init__( + self, + *, + interval_in_milli_seconds: Optional[int] = None, + multiplier: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BfdPatchConfiguration(_Model): + """BFD configuration properties. + + :ivar administrative_state: Administrative state of the BfdConfiguration. Example: Enabled | + Disabled. Known values are: "Enabled", "Disabled", "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + :ivar interval_in_milli_seconds: Interval in milliseconds. Example: 300. + :vartype interval_in_milli_seconds: int + :ivar multiplier: Multiplier for the Bfd Configuration. Example: 5. + :vartype multiplier: int + """ + + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the BfdConfiguration. Example: Enabled | Disabled. Known values are: + \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + interval_in_milli_seconds: Optional[int] = rest_field( + name="intervalInMilliSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Interval in milliseconds. Example: 300.""" + multiplier: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Multiplier for the Bfd Configuration. Example: 5.""" + + @overload + def __init__( + self, + *, + interval_in_milli_seconds: Optional[int] = None, + multiplier: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BgpConfiguration(AnnotationResource): + """BGP configuration properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values + are: "True" and "False". + :vartype default_route_originate: str or + ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar allow_as: Allows for routes to be received and processed even if the router detects its + own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + :vartype allow_as: int + :ivar allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". + :vartype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride + :ivar fabric_asn: ASN of Network Fabric. Example: 65048. + :vartype fabric_asn: int + :ivar peer_asn: Peer ASN. Example: 65047. Required. + :vartype peer_asn: int + :ivar ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. + :vartype ipv4_listen_range_prefixes: list[str] + :ivar ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. + :vartype ipv6_listen_range_prefixes: list[str] + :ivar ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. + :vartype ipv4_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] + :ivar ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. + :vartype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] + :ivar bmp_configuration: InternalNetwork BMP Configuration. + :vartype bmp_configuration: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkBmpProperties + :ivar v4_over_v6_bgp_session: V4 over V6 bgp session. Known values are: "Enabled" and + "Disabled". + :vartype v4_over_v6_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V4OverV6BgpSessionState + :ivar v6_over_v4_bgp_session: v6 over v4 bgp session. Known values are: "Enabled" and + "Disabled". + :vartype v6_over_v4_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V6OverV4BgpSessionState + """ + + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="defaultRouteOriginate", visibility=["read", "create", "update", "delete", "query"] + ) + """Originate a defaultRoute. Ex: \"True\" | \"False\". Known values are: \"True\" and \"False\".""" + allow_as: Optional[int] = rest_field(name="allowAS", visibility=["read", "create", "update", "delete", "query"]) + """Allows for routes to be received and processed even if the router detects its own ASN in the + AS-Path. 0 is disable, Possible values are 1-10, default is 2.""" + allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = rest_field( + name="allowASOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable Or Disable state. Known values are: \"Enable\" and \"Disable\".""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """ASN of Network Fabric. Example: 65048.""" + peer_asn: int = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN. Example: 65047. Required.""" + ipv4_listen_range_prefixes: Optional[list[str]] = rest_field( + name="ipv4ListenRangePrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of BGP IPv4 Listen Range prefixes.""" + ipv6_listen_range_prefixes: Optional[list[str]] = rest_field( + name="ipv6ListenRangePrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of BGP IPv6 Listen Ranges prefixes.""" + ipv4_neighbor_address: Optional[list["_models.NeighborAddress"]] = rest_field( + name="ipv4NeighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """List with stringified IPv4 Neighbor Addresses.""" + ipv6_neighbor_address: Optional[list["_models.NeighborAddress"]] = rest_field( + name="ipv6NeighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """List with stringified IPv6 Neighbor Address.""" + bmp_configuration: Optional["_models.InternalNetworkBmpProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """InternalNetwork BMP Configuration.""" + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = rest_field( + name="v4OverV6BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V4 over V6 bgp session. Known values are: \"Enabled\" and \"Disabled\".""" + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = rest_field( + name="v6OverV4BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """v6 over v4 bgp session. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + peer_asn: int, + annotation: Optional[str] = None, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + allow_as: Optional[int] = None, + allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = None, + ipv4_listen_range_prefixes: Optional[list[str]] = None, + ipv6_listen_range_prefixes: Optional[list[str]] = None, + ipv4_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, + ipv6_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, + bmp_configuration: Optional["_models.InternalNetworkBmpProperties"] = None, + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = None, + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BgpPatchConfiguration(AnnotationResource): + """BGP configuration properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values + are: "True" and "False". + :vartype default_route_originate: str or + ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar allow_as: Allows for routes to be received and processed even if the router detects its + own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + :vartype allow_as: int + :ivar allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". + :vartype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride + :ivar fabric_asn: ASN of Network Fabric. Example: 65048. + :vartype fabric_asn: int + :ivar peer_asn: Peer ASN. Example: 65047. + :vartype peer_asn: int + :ivar ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. + :vartype ipv4_listen_range_prefixes: list[str] + :ivar ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. + :vartype ipv6_listen_range_prefixes: list[str] + :ivar ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. + :vartype ipv4_neighbor_address: + list[~azure.mgmt.managednetworkfabric.models.NeighborAddressPatch] + :ivar ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. + :vartype ipv6_neighbor_address: + list[~azure.mgmt.managednetworkfabric.models.NeighborAddressPatch] + :ivar bmp_configuration: InternalNetwork BMP Configuration. + :vartype bmp_configuration: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkBmpPatchProperties + :ivar v4_over_v6_bgp_session: V4 over V6 bgp session. Known values are: "Enabled" and + "Disabled". + :vartype v4_over_v6_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V4OverV6BgpSessionState + :ivar v6_over_v4_bgp_session: v6 over v4 bgp session. Known values are: "Enabled" and + "Disabled". + :vartype v6_over_v4_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V6OverV4BgpSessionState + """ + + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="defaultRouteOriginate", visibility=["read", "create", "update", "delete", "query"] + ) + """Originate a defaultRoute. Ex: \"True\" | \"False\". Known values are: \"True\" and \"False\".""" + allow_as: Optional[int] = rest_field(name="allowAS", visibility=["read", "create", "update", "delete", "query"]) + """Allows for routes to be received and processed even if the router detects its own ASN in the + AS-Path. 0 is disable, Possible values are 1-10, default is 2.""" + allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = rest_field( + name="allowASOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable Or Disable state. Known values are: \"Enable\" and \"Disable\".""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """ASN of Network Fabric. Example: 65048.""" + peer_asn: Optional[int] = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN. Example: 65047.""" + ipv4_listen_range_prefixes: Optional[list[str]] = rest_field( + name="ipv4ListenRangePrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of BGP IPv4 Listen Range prefixes.""" + ipv6_listen_range_prefixes: Optional[list[str]] = rest_field( + name="ipv6ListenRangePrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of BGP IPv6 Listen Ranges prefixes.""" + ipv4_neighbor_address: Optional[list["_models.NeighborAddressPatch"]] = rest_field( + name="ipv4NeighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """List with stringified IPv4 Neighbor Addresses.""" + ipv6_neighbor_address: Optional[list["_models.NeighborAddressPatch"]] = rest_field( + name="ipv6NeighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """List with stringified IPv6 Neighbor Address.""" + bmp_configuration: Optional["_models.InternalNetworkBmpPatchProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """InternalNetwork BMP Configuration.""" + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = rest_field( + name="v4OverV6BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V4 over V6 bgp session. Known values are: \"Enabled\" and \"Disabled\".""" + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = rest_field( + name="v6OverV4BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """v6 over v4 bgp session. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + allow_as: Optional[int] = None, + allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = None, + peer_asn: Optional[int] = None, + ipv4_listen_range_prefixes: Optional[list[str]] = None, + ipv6_listen_range_prefixes: Optional[list[str]] = None, + ipv4_neighbor_address: Optional[list["_models.NeighborAddressPatch"]] = None, + ipv6_neighbor_address: Optional[list["_models.NeighborAddressPatch"]] = None, + bmp_configuration: Optional["_models.InternalNetworkBmpPatchProperties"] = None, + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = None, + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BitRate(_Model): + """Bit rate in bits per second. + + :ivar rate: Bitrate. + :vartype rate: int + :ivar unit: Bitrate unit. Known values are: "bps", "Kbps", "Mbps", "Gbps", and "Pps". + :vartype unit: str or ~azure.mgmt.managednetworkfabric.models.BitRateUnit + """ + + rate: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Bitrate.""" + unit: Optional[Union[str, "_models.BitRateUnit"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Bitrate unit. Known values are: \"bps\", \"Kbps\", \"Mbps\", \"Gbps\", and \"Pps\".""" + + @overload + def __init__( + self, + *, + rate: Optional[int] = None, + unit: Optional[Union[str, "_models.BitRateUnit"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BmpConfigurationPatchProperties(_Model): + """BMP Configuration patch properties. + + :ivar station_configuration_state: Enabling a station. Either True/False. Known values are: + "Enabled" and "Disabled". + :vartype station_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.StationConfigurationState + :ivar scope_resource_id: Scope resource ARM Identifier. + :vartype scope_resource_id: str + :ivar station_name: Name of the station. + :vartype station_name: str + :ivar station_ip: IP Address of the station. + :vartype station_ip: str + :ivar station_port: Port of the station. Default value is 5000. + :vartype station_port: int + :ivar station_connection_mode: Station Connection Mode. Known values are: "Active" and + "Passive". + :vartype station_connection_mode: str or + ~azure.mgmt.managednetworkfabric.models.StationConnectionMode + :ivar station_connection_properties: Station Connection Properties. + :vartype station_connection_properties: + ~azure.mgmt.managednetworkfabric.models.StationConnectionPatchProperties + :ivar station_network: Network of the station. + :vartype station_network: str + :ivar monitored_networks: The List of Network ID's that need to be monitored. + :vartype monitored_networks: list[str] + :ivar export_policy: Export Policy for the BMP Configuration. Known values are: "Pre-Policy", + "Post-Policy", "All", and "LocalRib". + :vartype export_policy: str or ~azure.mgmt.managednetworkfabric.models.BmpExportPolicy + :ivar export_policy_configuration: Export Policy configuration properties for the BMP. + :vartype export_policy_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpExportPolicyPatchProperties + :ivar monitored_address_families: Monitored Address Families for the BMP Configuration. + :vartype monitored_address_families: list[str or + ~azure.mgmt.managednetworkfabric.models.BmpMonitoredAddressFamily] + """ + + station_configuration_state: Optional[Union[str, "_models.StationConfigurationState"]] = rest_field( + name="stationConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """Enabling a station. Either True/False. Known values are: \"Enabled\" and \"Disabled\".""" + scope_resource_id: Optional[str] = rest_field( + name="scopeResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Scope resource ARM Identifier.""" + station_name: Optional[str] = rest_field( + name="stationName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the station.""" + station_ip: Optional[str] = rest_field(name="stationIp", visibility=["read", "create", "update", "delete", "query"]) + """IP Address of the station.""" + station_port: Optional[int] = rest_field( + name="stationPort", visibility=["read", "create", "update", "delete", "query"] + ) + """Port of the station. Default value is 5000.""" + station_connection_mode: Optional[Union[str, "_models.StationConnectionMode"]] = rest_field( + name="stationConnectionMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Station Connection Mode. Known values are: \"Active\" and \"Passive\".""" + station_connection_properties: Optional["_models.StationConnectionPatchProperties"] = rest_field( + name="stationConnectionProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Station Connection Properties.""" + station_network: Optional[str] = rest_field( + name="stationNetwork", visibility=["read", "create", "update", "delete", "query"] + ) + """Network of the station.""" + monitored_networks: Optional[list[str]] = rest_field( + name="monitoredNetworks", visibility=["read", "create", "update", "delete", "query"] + ) + """The List of Network ID's that need to be monitored.""" + export_policy: Optional[Union[str, "_models.BmpExportPolicy"]] = rest_field( + name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy for the BMP Configuration. Known values are: \"Pre-Policy\", \"Post-Policy\", + \"All\", and \"LocalRib\".""" + export_policy_configuration: Optional["_models.BmpExportPolicyPatchProperties"] = rest_field( + name="exportPolicyConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy configuration properties for the BMP.""" + monitored_address_families: Optional[list[Union[str, "_models.BmpMonitoredAddressFamily"]]] = rest_field( + name="monitoredAddressFamilies", visibility=["read", "create", "update", "delete", "query"] + ) + """Monitored Address Families for the BMP Configuration.""" + + @overload + def __init__( + self, + *, + station_configuration_state: Optional[Union[str, "_models.StationConfigurationState"]] = None, + scope_resource_id: Optional[str] = None, + station_name: Optional[str] = None, + station_ip: Optional[str] = None, + station_port: Optional[int] = None, + station_connection_mode: Optional[Union[str, "_models.StationConnectionMode"]] = None, + station_connection_properties: Optional["_models.StationConnectionPatchProperties"] = None, + station_network: Optional[str] = None, + monitored_networks: Optional[list[str]] = None, + export_policy: Optional[Union[str, "_models.BmpExportPolicy"]] = None, + export_policy_configuration: Optional["_models.BmpExportPolicyPatchProperties"] = None, + monitored_address_families: Optional[list[Union[str, "_models.BmpMonitoredAddressFamily"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BmpConfigurationProperties(_Model): + """BGP Monitoring Protocol (BMP) Configuration properties. + + :ivar station_configuration_state: Enabling a station. Either True/False. Known values are: + "Enabled" and "Disabled". + :vartype station_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.StationConfigurationState + :ivar scope_resource_id: Scope resource ARM Identifier. + :vartype scope_resource_id: str + :ivar station_name: Name of the station. + :vartype station_name: str + :ivar station_ip: IP Address of the station. + :vartype station_ip: str + :ivar station_port: Port of the station. Default value is 5000. + :vartype station_port: int + :ivar station_connection_mode: Station Connection Mode. Known values are: "Active" and + "Passive". + :vartype station_connection_mode: str or + ~azure.mgmt.managednetworkfabric.models.StationConnectionMode + :ivar station_connection_properties: Station Connection Properties. + :vartype station_connection_properties: + ~azure.mgmt.managednetworkfabric.models.StationConnectionProperties + :ivar station_network: Network of the station. + :vartype station_network: str + :ivar monitored_networks: The List of Network ID's that need to be monitored. + :vartype monitored_networks: list[str] + :ivar export_policy: Export Policy for the BMP Configuration. Known values are: "Pre-Policy", + "Post-Policy", "All", and "LocalRib". + :vartype export_policy: str or ~azure.mgmt.managednetworkfabric.models.BmpExportPolicy + :ivar export_policy_configuration: Export Policy configuration properties for the BMP. + :vartype export_policy_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpExportPolicyProperties + :ivar monitored_address_families: Monitored Address Families for the BMP Configuration. + :vartype monitored_address_families: list[str or + ~azure.mgmt.managednetworkfabric.models.BmpMonitoredAddressFamily] + """ + + station_configuration_state: Optional[Union[str, "_models.StationConfigurationState"]] = rest_field( + name="stationConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """Enabling a station. Either True/False. Known values are: \"Enabled\" and \"Disabled\".""" + scope_resource_id: Optional[str] = rest_field( + name="scopeResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Scope resource ARM Identifier.""" + station_name: Optional[str] = rest_field( + name="stationName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the station.""" + station_ip: Optional[str] = rest_field(name="stationIp", visibility=["read", "create", "update", "delete", "query"]) + """IP Address of the station.""" + station_port: Optional[int] = rest_field( + name="stationPort", visibility=["read", "create", "update", "delete", "query"] + ) + """Port of the station. Default value is 5000.""" + station_connection_mode: Optional[Union[str, "_models.StationConnectionMode"]] = rest_field( + name="stationConnectionMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Station Connection Mode. Known values are: \"Active\" and \"Passive\".""" + station_connection_properties: Optional["_models.StationConnectionProperties"] = rest_field( + name="stationConnectionProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Station Connection Properties.""" + station_network: Optional[str] = rest_field( + name="stationNetwork", visibility=["read", "create", "update", "delete", "query"] + ) + """Network of the station.""" + monitored_networks: Optional[list[str]] = rest_field( + name="monitoredNetworks", visibility=["read", "create", "update", "delete", "query"] + ) + """The List of Network ID's that need to be monitored.""" + export_policy: Optional[Union[str, "_models.BmpExportPolicy"]] = rest_field( + name="exportPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy for the BMP Configuration. Known values are: \"Pre-Policy\", \"Post-Policy\", + \"All\", and \"LocalRib\".""" + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = rest_field( + name="exportPolicyConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy configuration properties for the BMP.""" + monitored_address_families: Optional[list[Union[str, "_models.BmpMonitoredAddressFamily"]]] = rest_field( + name="monitoredAddressFamilies", visibility=["read", "create", "update", "delete", "query"] + ) + """Monitored Address Families for the BMP Configuration.""" + + @overload + def __init__( + self, + *, + station_configuration_state: Optional[Union[str, "_models.StationConfigurationState"]] = None, + scope_resource_id: Optional[str] = None, + station_name: Optional[str] = None, + station_ip: Optional[str] = None, + station_port: Optional[int] = None, + station_connection_mode: Optional[Union[str, "_models.StationConnectionMode"]] = None, + station_connection_properties: Optional["_models.StationConnectionProperties"] = None, + station_network: Optional[str] = None, + monitored_networks: Optional[list[str]] = None, + export_policy: Optional[Union[str, "_models.BmpExportPolicy"]] = None, + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = None, + monitored_address_families: Optional[list[Union[str, "_models.BmpMonitoredAddressFamily"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BmpExportPolicyPatchProperties(_Model): + """BMP Export Policy Configuration properties. + + :ivar export_policies: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + :vartype export_policies: list[str or ~azure.mgmt.managednetworkfabric.models.BmpExportPolicy] + """ + + export_policies: Optional[list[Union[str, "_models.BmpExportPolicy"]]] = rest_field( + name="exportPolicies", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy for the BGP Monitoring Protocol (BMP) Configuration.""" + + @overload + def __init__( + self, + *, + export_policies: Optional[list[Union[str, "_models.BmpExportPolicy"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BmpExportPolicyProperties(_Model): + """BMP Export Policy Configuration properties. + + :ivar export_policies: Export Policy for the BGP Monitoring Protocol (BMP) Configuration. + :vartype export_policies: list[str or ~azure.mgmt.managednetworkfabric.models.BmpExportPolicy] + """ + + export_policies: Optional[list[Union[str, "_models.BmpExportPolicy"]]] = rest_field( + name="exportPolicies", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Policy for the BGP Monitoring Protocol (BMP) Configuration.""" + + @overload + def __init__( + self, + *, + export_policies: Optional[list[Union[str, "_models.BmpExportPolicy"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BurstSize(_Model): + """Burst size in packets. + + :ivar size: Burst size. + :vartype size: int + :ivar unit: Burst size unit. Known values are: "Bytes", "KBytes", "MBytes", "GBytes", and + "Packets". + :vartype unit: str or ~azure.mgmt.managednetworkfabric.models.BurstSizeUnit + """ + + size: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Burst size.""" + unit: Optional[Union[str, "_models.BurstSizeUnit"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Burst size unit. Known values are: \"Bytes\", \"KBytes\", \"MBytes\", \"GBytes\", and + \"Packets\".""" + + @overload + def __init__( + self, + *, + size: Optional[int] = None, + unit: Optional[Union[str, "_models.BurstSizeUnit"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateArchiveReference(_Model): + """A reference to a version of a certificate in a key vault. + + :ivar key_vault_uri: A Uniform Resource Identifier (URI) for the certificate in the key vault. + :vartype key_vault_uri: str + :ivar key_vault_id: The resource ID of the key vault containing the certificate. + :vartype key_vault_id: str + :ivar certificate_name: The name of the certificate in the key vault. + :vartype certificate_name: str + :ivar certificate_version: The version of the certificate in the key vault. + :vartype certificate_version: str + """ + + key_vault_uri: Optional[str] = rest_field(name="keyVaultUri", visibility=["read"]) + """A Uniform Resource Identifier (URI) for the certificate in the key vault.""" + key_vault_id: Optional[str] = rest_field(name="keyVaultId", visibility=["read"]) + """The resource ID of the key vault containing the certificate.""" + certificate_name: Optional[str] = rest_field(name="certificateName", visibility=["read"]) + """The name of the certificate in the key vault.""" + certificate_version: Optional[str] = rest_field(name="certificateVersion", visibility=["read"]) + """The version of the certificate in the key vault.""" + + +class CertificateRotationStatus(_Model): + """Status of a certificate rotation for a device (Network Device or Terminal Server). + + :ivar expire_time: Time at which the certificate will expire, for certificates with a limited + validity period. + :vartype expire_time: ~datetime.datetime + :ivar last_rotation_time: The date and time when the certificate was last changed. + :vartype last_rotation_time: ~datetime.datetime + :ivar synchronization_status: Whether the device has been configured with the latest version of + the certificate. Known values are: "InSync", "Synchronizing", and "OutOfSync". + :vartype synchronization_status: str or + ~azure.mgmt.managednetworkfabric.models.SynchronizationStatus + :ivar certificate_archive_reference: Reference to the currently configured version of the + certificate in a key vault. + :vartype certificate_archive_reference: + ~azure.mgmt.managednetworkfabric.models.CertificateArchiveReference + :ivar certificate_type: Identifies the certificate according to its purpose. + :vartype certificate_type: str + """ + + expire_time: Optional[datetime.datetime] = rest_field(name="expireTime", visibility=["read"], format="rfc3339") + """Time at which the certificate will expire, for certificates with a limited validity period.""" + last_rotation_time: Optional[datetime.datetime] = rest_field( + name="lastRotationTime", visibility=["read"], format="rfc3339" + ) + """The date and time when the certificate was last changed.""" + synchronization_status: Optional[Union[str, "_models.SynchronizationStatus"]] = rest_field( + name="synchronizationStatus", visibility=["read"] + ) + """Whether the device has been configured with the latest version of the certificate. Known values + are: \"InSync\", \"Synchronizing\", and \"OutOfSync\".""" + certificate_archive_reference: Optional["_models.CertificateArchiveReference"] = rest_field( + name="certificateArchiveReference", visibility=["read"] + ) + """Reference to the currently configured version of the certificate in a key vault.""" + certificate_type: Optional[str] = rest_field(name="certificateType", visibility=["read"]) + """Identifies the certificate according to its purpose.""" + + +class CommitBatchDetails(_Model): + """Commit Batch Details. + + :ivar failed_devices: List of devices for which the commit operation failed. + :vartype failed_devices: list[str] + """ + + failed_devices: Optional[list[str]] = rest_field( + name="failedDevices", visibility=["read", "create", "update", "delete", "query"] + ) + """List of devices for which the commit operation failed.""" + + @overload + def __init__( + self, + *, + failed_devices: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommitBatchStatusOperationResponse(_Model): + """Commit Batch Status Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Commit Batch Status Response Properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.CommitBatchStatusResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.CommitBatchStatusResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Status Response Properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.CommitBatchStatusResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommitBatchStatusRequest(_Model): + """Commit Batch Status Request. + + :ivar commit_batch_id: Commit Batch Identifier. If not provided, the latest commit batch status + will be returned. + :vartype commit_batch_id: str + """ + + commit_batch_id: Optional[str] = rest_field( + name="commitBatchId", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Identifier. If not provided, the latest commit batch status will be returned.""" + + @overload + def __init__( + self, + *, + commit_batch_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommitBatchStatusResponseProperties(_Model): + """Commit Batch Status Response Properties. + + :ivar commit_batch_id: Commit Batch Identifier. + :vartype commit_batch_id: str + :ivar commit_batch_state: Commit Batch State. Known values are: "Processing", "Succeeded", and + "Failed". + :vartype commit_batch_state: str or ~azure.mgmt.managednetworkfabric.models.CommitBatchState + :ivar commit_batch_details: Commit Batch Details. + :vartype commit_batch_details: ~azure.mgmt.managednetworkfabric.models.CommitBatchDetails + """ + + commit_batch_id: Optional[str] = rest_field( + name="commitBatchId", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Identifier.""" + commit_batch_state: Optional[Union[str, "_models.CommitBatchState"]] = rest_field( + name="commitBatchState", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch State. Known values are: \"Processing\", \"Succeeded\", and \"Failed\".""" + commit_batch_details: Optional["_models.CommitBatchDetails"] = rest_field( + name="commitBatchDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Details.""" + + @overload + def __init__( + self, + *, + commit_batch_id: Optional[str] = None, + commit_batch_state: Optional[Union[str, "_models.CommitBatchState"]] = None, + commit_batch_details: Optional["_models.CommitBatchDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommitConfigurationRequest(_Model): + """Commit Configuration Request. + + :ivar commit_stage: Commit stage Action to be performed. Known values are: "Start", "Continue", + and "Rollback". + :vartype commit_stage: str or ~azure.mgmt.managednetworkfabric.models.CommitStage + :ivar commit_policy: Commit configuration Policy. Supported policy is StageCEConfiguration, + which indicates to prepare the configuration for the CE device type. "StageCEConfiguration" + :vartype commit_policy: str or + ~azure.mgmt.managednetworkfabric.models.CommitConfigurationPolicy + :ivar devices: List of ARM resource IDs of devices to be included in the commit operation. + Either CE1 or CE2 is allowed. + :vartype devices: list[str] + """ + + commit_stage: Optional[Union[str, "_models.CommitStage"]] = rest_field( + name="commitStage", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit stage Action to be performed. Known values are: \"Start\", \"Continue\", and + \"Rollback\".""" + commit_policy: Optional[Union[str, "_models.CommitConfigurationPolicy"]] = rest_field( + name="commitPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit configuration Policy. Supported policy is StageCEConfiguration, which indicates to + prepare the configuration for the CE device type. \"StageCEConfiguration\"""" + devices: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of ARM resource IDs of devices to be included in the commit operation. Either CE1 or CE2 + is allowed.""" + + @overload + def __init__( + self, + *, + commit_stage: Optional[Union[str, "_models.CommitStage"]] = None, + commit_policy: Optional[Union[str, "_models.CommitConfigurationPolicy"]] = None, + devices: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommitConfigurationResponse(_Model): + """Commit Configuration Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonDynamicMatchConfiguration(_Model): + """Dynamic match configuration object. + + :ivar ip_groups: List of IP Groups. + :vartype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupProperties] + :ivar vlan_groups: List of vlan groups. + :vartype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupProperties] + :ivar port_groups: List of the port groups. + :vartype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupProperties] + """ + + ip_groups: Optional[list["_models.IpGroupProperties"]] = rest_field( + name="ipGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Groups.""" + vlan_groups: Optional[list["_models.VlanGroupProperties"]] = rest_field( + name="vlanGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of vlan groups.""" + port_groups: Optional[list["_models.PortGroupProperties"]] = rest_field( + name="portGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the port groups.""" + + @overload + def __init__( + self, + *, + ip_groups: Optional[list["_models.IpGroupProperties"]] = None, + vlan_groups: Optional[list["_models.VlanGroupProperties"]] = None, + port_groups: Optional[list["_models.PortGroupProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonDynamicMatchConfigurationPatch(_Model): + """Dynamic match configuration object. + + :ivar ip_groups: List of IP Groups. + :vartype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupPatchProperties] + :ivar vlan_groups: List of vlan groups. + :vartype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupPatchProperties] + :ivar port_groups: List of the port groups. + :vartype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupPatchProperties] + """ + + ip_groups: Optional[list["_models.IpGroupPatchProperties"]] = rest_field( + name="ipGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Groups.""" + vlan_groups: Optional[list["_models.VlanGroupPatchProperties"]] = rest_field( + name="vlanGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of vlan groups.""" + port_groups: Optional[list["_models.PortGroupPatchProperties"]] = rest_field( + name="portGroups", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the port groups.""" + + @overload + def __init__( + self, + *, + ip_groups: Optional[list["_models.IpGroupPatchProperties"]] = None, + vlan_groups: Optional[list["_models.VlanGroupPatchProperties"]] = None, + port_groups: Optional[list["_models.PortGroupPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonErrorResponse(_Model): + """The error message. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonPostActionResponseForDeviceROCommands(_Model): # pylint: disable=name-too-long + """Common response for device Ro Commands. + + :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar output_url: Predefined link containing Device RO Command output. + :vartype output_url: str + :ivar device_configuration_preview: Device RO command Response limited to 4000 characters. + :vartype device_configuration_preview: str + """ + + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configuration state. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + output_url: Optional[str] = rest_field(name="outputUrl", visibility=["read", "create", "update", "delete", "query"]) + """Predefined link containing Device RO Command output.""" + device_configuration_preview: Optional[str] = rest_field( + name="deviceConfigurationPreview", visibility=["read", "create", "update", "delete", "query"] + ) + """Device RO command Response limited to 4000 characters.""" + + @overload + def __init__( + self, + *, + output_url: Optional[str] = None, + device_configuration_preview: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonPostActionResponseForDeviceROCommandsOperationStatusResult( + CommonErrorResponse +): # pylint: disable=name-too-long + """The current status of an async operation. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar properties: The additional properties of the operation status result. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommands + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar status: Operation status. Required. + :vartype status: str + """ + + end_time: Optional[datetime.datetime] = rest_field(name="endTime", visibility=["read"], format="rfc3339") + """The end time of the operation.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Name of the async operation.""" + properties: Optional["_models.CommonPostActionResponseForDeviceROCommands"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The additional properties of the operation status result.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339") + """The start time of the operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + + @overload + def __init__( + self, + *, + status: str, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.CommonPostActionResponseForDeviceROCommands"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonPostActionResponseForDeviceUpdate(CommonErrorResponse): + """Common response for device updates. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar successful_devices: List of ARM Resource IDs for which the given action applied + successfully. + :vartype successful_devices: list[str] + :ivar failed_devices: List of ARM Resource IDs for which the given action failed to apply. + :vartype failed_devices: list[str] + """ + + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configuration state. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + successful_devices: Optional[list[str]] = rest_field( + name="successfulDevices", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ARM Resource IDs for which the given action applied successfully.""" + failed_devices: Optional[list[str]] = rest_field( + name="failedDevices", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ARM Resource IDs for which the given action failed to apply.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + successful_devices: Optional[list[str]] = None, + failed_devices: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CommonPostActionResponseForStateUpdate(CommonErrorResponse): + """Common response for the state updates. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configuration state. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConditionalDefaultRouteProperties(_Model): + """Conditional Default Route Configuration properties. + + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + """ + + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectedSubnet(AnnotationResource): + """Connected Subnet properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar prefix: Prefix of the Connected Subnet. Required. + :vartype prefix: str + """ + + prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Prefix of the Connected Subnet. Required.""" + + @overload + def __init__( + self, + *, + prefix: str, + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectedSubnetPatch(AnnotationResource): + """Connected Subnet properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar prefix: Prefix of the Connected Subnet. Required. + :vartype prefix: str + """ + + prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Prefix of the Connected Subnet. Required.""" + + @overload + def __init__( + self, + *, + prefix: str, + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectedSubnetRoutePolicy(_Model): + """Connected Subnet Route Policy properties. + + :ivar export_route_policy: Array of ARM Resource ID of the RoutePolicies. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy + """ + + export_route_policy: Optional["_models.L3ExportRoutePolicy"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of ARM Resource ID of the RoutePolicies.""" + + @overload + def __init__( + self, + *, + export_route_policy: Optional["_models.L3ExportRoutePolicy"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ConnectedSubnetRoutePolicyPatch(_Model): + """Connected Subnet Route Policy properties. + + :ivar export_route_policy: Array of ARM Resource ID of the RoutePolicies. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicyPatch + """ + + export_route_policy: Optional["_models.L3ExportRoutePolicyPatch"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of ARM Resource ID of the RoutePolicies.""" + + @overload + def __init__( + self, + *, + export_route_policy: Optional["_models.L3ExportRoutePolicyPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControllerServices(_Model): + """Network Fabric Controller services. + + :ivar ipv4_address_spaces: The IPv4 Address space is optional, if the value is not defined at + the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address + subnet is an optional attribute. + :vartype ipv4_address_spaces: list[str] + :ivar ipv6_address_spaces: The IPv6 is not supported right now. + :vartype ipv6_address_spaces: list[str] + """ + + ipv4_address_spaces: Optional[list[str]] = rest_field( + name="ipv4AddressSpaces", visibility=["read", "create", "update", "delete", "query"] + ) + """The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, + then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional + attribute.""" + ipv6_address_spaces: Optional[list[str]] = rest_field( + name="ipv6AddressSpaces", visibility=["read", "create", "update", "delete", "query"] + ) + """The IPv6 is not supported right now.""" + + @overload + def __init__( + self, + *, + ipv4_address_spaces: Optional[list[str]] = None, + ipv6_address_spaces: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlanAclIpMatchCondition(_Model): + """Control Plane Access Control List (ACL) IP condition properties. + + :ivar source_ip_prefix: List of the source IP addresses that need to be matched. + :vartype source_ip_prefix: str + :ivar destination_ip_prefix: List of the destination IP addresses that need to be matched. + :vartype destination_ip_prefix: str + """ + + source_ip_prefix: Optional[str] = rest_field( + name="sourceIpPrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the source IP addresses that need to be matched.""" + destination_ip_prefix: Optional[str] = rest_field( + name="destinationIpPrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the destination IP addresses that need to be matched.""" + + @overload + def __init__( + self, + *, + source_ip_prefix: Optional[str] = None, + destination_ip_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclAction(_Model): + """Control Plane Access Control List (ACL) Actions. + + :ivar type: Type of actions that can be performed. Known values are: "Permit", "Deny", and + "Remark". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclActionType + :ivar remark_comment: Remark comment. + :vartype remark_comment: str + """ + + type: Optional[Union[str, "_models.ControlPlaneAclActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Permit\", \"Deny\", and \"Remark\".""" + remark_comment: Optional[str] = rest_field( + name="remarkComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Remark comment.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.ControlPlaneAclActionType"]] = None, + remark_comment: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclActionPatch(_Model): + """Control Plane Access Control List (ACL) Actions. + + :ivar type: Type of actions that can be performed. Known values are: "Permit", "Deny", and + "Remark". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclActionType + :ivar remark_comment: Remark comment. + :vartype remark_comment: str + """ + + type: Optional[Union[str, "_models.ControlPlaneAclActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Permit\", \"Deny\", and \"Remark\".""" + remark_comment: Optional[str] = rest_field( + name="remarkComment", visibility=["read", "create", "update", "delete", "query"] + ) + """Remark comment.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.ControlPlaneAclActionType"]] = None, + remark_comment: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclIpMatchConditionPatch(_Model): + """Control Plane Access Control List (ACL) IP condition patch properties. + + :ivar source_ip_prefix: List of the source IP addresses that need to be matched. + :vartype source_ip_prefix: str + :ivar destination_ip_prefix: List of the destination IP addresses that need to be matched. + :vartype destination_ip_prefix: str + """ + + source_ip_prefix: Optional[str] = rest_field( + name="sourceIpPrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the source IP addresses that need to be matched.""" + destination_ip_prefix: Optional[str] = rest_field( + name="destinationIpPrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the destination IP addresses that need to be matched.""" + + @overload + def __init__( + self, + *, + source_ip_prefix: Optional[str] = None, + destination_ip_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclMatchCondition(_Model): + """Control Plane Access Control List (ACL) match conditions properties. + + :ivar protocol_types: Protocols that need to be matched. + :vartype protocol_types: str + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.ControlPlanAclIpMatchCondition + :ivar ttl_match_condition: TTL [Time To Live] values that need to be matched. + :vartype ttl_match_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchCondition + :ivar port_condition: Port condition that needs to be matched. + :vartype port_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchCondition + :ivar flags: Flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, + established. + :vartype flags: list[str] + :ivar icmp_configuration: Internet Control Message Protocol (ICMP) configuration. + :vartype icmp_configuration: + ~azure.mgmt.managednetworkfabric.models.IcmpConfigurationProperties + """ + + protocol_types: Optional[str] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocols that need to be matched.""" + ip_condition: Optional["_models.ControlPlanAclIpMatchCondition"] = rest_field( + name="ipCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """IP condition that needs to be matched.""" + ttl_match_condition: Optional["_models.ControlPlaneAclTtlMatchCondition"] = rest_field( + name="ttlMatchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """TTL [Time To Live] values that need to be matched.""" + port_condition: Optional["_models.ControlPlaneAclPortMatchCondition"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Port condition that needs to be matched.""" + flags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Flags that need to be matched. Example: established | initial | . List of + eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established.""" + icmp_configuration: Optional["_models.IcmpConfigurationProperties"] = rest_field( + name="icmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) configuration.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[str] = None, + ip_condition: Optional["_models.ControlPlanAclIpMatchCondition"] = None, + ttl_match_condition: Optional["_models.ControlPlaneAclTtlMatchCondition"] = None, + port_condition: Optional["_models.ControlPlaneAclPortMatchCondition"] = None, + flags: Optional[list[str]] = None, + icmp_configuration: Optional["_models.IcmpConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclMatchConditionPatch(_Model): + """Control Plane Access Control List (ACL) match conditions properties. + + :ivar protocol_types: Protocols that need to be matched. + :vartype protocol_types: str + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclIpMatchConditionPatch + :ivar ttl_match_condition: TTL [Time To Live] values that need to be matched. + :vartype ttl_match_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchConditionPatch + :ivar port_condition: Port condition that needs to be matched. + :vartype port_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchConditionPatch + :ivar flags: Flags that need to be matched. Example: established | initial | + . List of eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, + established. + :vartype flags: list[str] + :ivar icmp_configuration: Internet Control Message Protocol (ICMP) configuration. + :vartype icmp_configuration: + ~azure.mgmt.managednetworkfabric.models.IcmpConfigurationPatchProperties + """ + + protocol_types: Optional[str] = rest_field( + name="protocolTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Protocols that need to be matched.""" + ip_condition: Optional["_models.ControlPlaneAclIpMatchConditionPatch"] = rest_field( + name="ipCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """IP condition that needs to be matched.""" + ttl_match_condition: Optional["_models.ControlPlaneAclTtlMatchConditionPatch"] = rest_field( + name="ttlMatchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """TTL [Time To Live] values that need to be matched.""" + port_condition: Optional["_models.ControlPlaneAclPortMatchConditionPatch"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Port condition that needs to be matched.""" + flags: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Flags that need to be matched. Example: established | initial | . List of + eligible TCP Flags are ack, cwr, ece, fin, psh, rst, syn, urg, established.""" + icmp_configuration: Optional["_models.IcmpConfigurationPatchProperties"] = rest_field( + name="icmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) configuration.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[str] = None, + ip_condition: Optional["_models.ControlPlaneAclIpMatchConditionPatch"] = None, + ttl_match_condition: Optional["_models.ControlPlaneAclTtlMatchConditionPatch"] = None, + port_condition: Optional["_models.ControlPlaneAclPortMatchConditionPatch"] = None, + flags: Optional[list[str]] = None, + icmp_configuration: Optional["_models.IcmpConfigurationPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclMatchConfigurationPatchProperties(_Model): # pylint: disable=name-too-long + """Control Plane Access Control List (ACL) match configurations properties. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration. + :vartype sequence_number: int + :ivar match_condition: Match conditions. + :vartype match_condition: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConditionPatch + :ivar action: Action that need to be performed for the matched conditions. + :vartype action: ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclActionPatch + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration.""" + match_condition: Optional["_models.ControlPlaneAclMatchConditionPatch"] = rest_field( + name="matchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Match conditions.""" + action: Optional["_models.ControlPlaneAclActionPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + match_condition: Optional["_models.ControlPlaneAclMatchConditionPatch"] = None, + action: Optional["_models.ControlPlaneAclActionPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclMatchConfigurationProperties(_Model): # pylint: disable=name-too-long + """Control Plane Access Control List (ACL) match configurations properties. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration. + :vartype sequence_number: int + :ivar match_condition: Match conditions. + :vartype match_condition: ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchCondition + :ivar action: Action that need to be performed for the matched conditions. + :vartype action: ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclAction + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration.""" + match_condition: Optional["_models.ControlPlaneAclMatchCondition"] = rest_field( + name="matchCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Match conditions.""" + action: Optional["_models.ControlPlaneAclAction"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + match_condition: Optional["_models.ControlPlaneAclMatchCondition"] = None, + action: Optional["_models.ControlPlaneAclAction"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclPatchProperties(_Model): + """Access Control List (ACL) configurations patch properties. + + :ivar ip_address_type: IP Address Type. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_configurations: Access Control List (ACL) match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConfigurationPatchProperties] + """ + + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address Type. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_configurations: Optional[list["_models.ControlPlaneAclMatchConfigurationPatchProperties"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) match configurations.""" + + @overload + def __init__( + self, + *, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_configurations: Optional[list["_models.ControlPlaneAclMatchConfigurationPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclPortCondition(_Model): + """Control Plane Access Control List (ACL) Port Match conditions properties. + + :ivar ports: List of the ports that need to be matched. Possible values: 1234, 1234-1235, + 1234,1235,1236. + :vartype ports: list[str] + :ivar port_match_type: Port match type. Example: eq | neq | gt | lt | range. Known values are: + "eq", "neq", "gt", "lt", and "range". + :vartype port_match_type: str or + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortMatchType + """ + + ports: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of the ports that need to be matched. Possible values: 1234, 1234-1235, 1234,1235,1236.""" + port_match_type: Optional[Union[str, "_models.ControlPlaneAclPortMatchType"]] = rest_field( + name="portMatchType", visibility=["read", "create", "update", "delete", "query"] + ) + """Port match type. Example: eq | neq | gt | lt | range. Known values are: \"eq\", \"neq\", + \"gt\", \"lt\", and \"range\".""" + + @overload + def __init__( + self, + *, + ports: Optional[list[str]] = None, + port_match_type: Optional[Union[str, "_models.ControlPlaneAclPortMatchType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclPortMatchCondition(_Model): + """Control Plane Access Control List (ACL) Port Match conditions properties. + + :ivar source_ports: List of the ports that need to be matched. + :vartype source_ports: ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortCondition + :ivar destination_ports: List of the destination ports that need to be matched. + :vartype destination_ports: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortCondition + """ + + source_ports: Optional["_models.ControlPlaneAclPortCondition"] = rest_field( + name="sourcePorts", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the ports that need to be matched.""" + destination_ports: Optional["_models.ControlPlaneAclPortCondition"] = rest_field( + name="destinationPorts", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the destination ports that need to be matched.""" + + @overload + def __init__( + self, + *, + source_ports: Optional["_models.ControlPlaneAclPortCondition"] = None, + destination_ports: Optional["_models.ControlPlaneAclPortCondition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclPortMatchConditionPatch(_Model): + """Control Plane Access Control List (ACL) Port Match conditions properties. + + :ivar source_ports: List of the ports that need to be matched. + :vartype source_ports: ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortCondition + :ivar destination_ports: List of the destination ports that need to be matched. + :vartype destination_ports: + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclPortCondition + """ + + source_ports: Optional["_models.ControlPlaneAclPortCondition"] = rest_field( + name="sourcePorts", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the ports that need to be matched.""" + destination_ports: Optional["_models.ControlPlaneAclPortCondition"] = rest_field( + name="destinationPorts", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the destination ports that need to be matched.""" + + @overload + def __init__( + self, + *, + source_ports: Optional["_models.ControlPlaneAclPortCondition"] = None, + destination_ports: Optional["_models.ControlPlaneAclPortCondition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclProperties(_Model): + """Access Control List (ACL) configurations properties. + + :ivar ip_address_type: IP Address Type. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_configurations: Access Control List (ACL) match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.ControlPlaneAclMatchConfigurationProperties] + """ + + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address Type. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_configurations: Optional[list["_models.ControlPlaneAclMatchConfigurationProperties"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """Access Control List (ACL) match configurations.""" + + @overload + def __init__( + self, + *, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_configurations: Optional[list["_models.ControlPlaneAclMatchConfigurationProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclTtlMatchCondition(_Model): + """TTL [Time To Live] match conditions properties. + + :ivar ttl_value: TTL [Time To Live] values that need to be matched. + :vartype ttl_value: str + :ivar ttl_match_type: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. Known + values are: "eq", "neq", "gt", and "lt". + :vartype ttl_match_type: str or + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchType + """ + + ttl_value: Optional[str] = rest_field(name="ttlValue", visibility=["read", "create", "update", "delete", "query"]) + """TTL [Time To Live] values that need to be matched.""" + ttl_match_type: Optional[Union[str, "_models.ControlPlaneAclTtlMatchType"]] = rest_field( + name="ttlMatchType", visibility=["read", "create", "update", "delete", "query"] + ) + """TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. Known values are: \"eq\", + \"neq\", \"gt\", and \"lt\".""" + + @overload + def __init__( + self, + *, + ttl_value: Optional[str] = None, + ttl_match_type: Optional[Union[str, "_models.ControlPlaneAclTtlMatchType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ControlPlaneAclTtlMatchConditionPatch(_Model): + """TTL [Time To Live] match conditions patch properties. + + :ivar ttl_value: TTL [Time To Live] values that need to be matched. + :vartype ttl_value: str + :ivar ttl_match_type: TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. Known + values are: "eq", "neq", "gt", and "lt". + :vartype ttl_match_type: str or + ~azure.mgmt.managednetworkfabric.models.ControlPlaneAclTtlMatchType + """ + + ttl_value: Optional[str] = rest_field(name="ttlValue", visibility=["read", "create", "update", "delete", "query"]) + """TTL [Time To Live] values that need to be matched.""" + ttl_match_type: Optional[Union[str, "_models.ControlPlaneAclTtlMatchType"]] = rest_field( + name="ttlMatchType", visibility=["read", "create", "update", "delete", "query"] + ) + """TTL [Time To Live] match type. Example: eq | neq | gt | lt | range. Known values are: \"eq\", + \"neq\", \"gt\", and \"lt\".""" + + @overload + def __init__( + self, + *, + ttl_value: Optional[str] = None, + ttl_match_type: Optional[Union[str, "_models.ControlPlaneAclTtlMatchType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DestinationPatchProperties(_Model): + """The network tap destination properties. + + :ivar name: Destination name. + :vartype name: str + :ivar destination_type: Type of destination. Input can be IsolationDomain or Direct. Known + values are: "IsolationDomain" and "Direct". + :vartype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType + :ivar destination_id: The destination Id. ARM Resource ID of either NNI or Internal Networks. + :vartype destination_id: str + :ivar isolation_domain_properties: Isolation Domain Properties. + :vartype isolation_domain_properties: + ~azure.mgmt.managednetworkfabric.models.IsolationDomainPatchProperties + :ivar destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match + configurations. + :vartype destination_tap_rule_id: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Destination name.""" + destination_type: Optional[Union[str, "_models.DestinationType"]] = rest_field( + name="destinationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of destination. Input can be IsolationDomain or Direct. Known values are: + \"IsolationDomain\" and \"Direct\".""" + destination_id: Optional[str] = rest_field( + name="destinationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The destination Id. ARM Resource ID of either NNI or Internal Networks.""" + isolation_domain_properties: Optional["_models.IsolationDomainPatchProperties"] = rest_field( + name="isolationDomainProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Isolation Domain Properties.""" + destination_tap_rule_id: Optional[str] = rest_field( + name="destinationTapRuleId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of destination Tap Rule that contains match configurations.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + destination_type: Optional[Union[str, "_models.DestinationType"]] = None, + destination_id: Optional[str] = None, + isolation_domain_properties: Optional["_models.IsolationDomainPatchProperties"] = None, + destination_tap_rule_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DestinationProperties(_Model): + """The network tap destination properties. + + :ivar name: Destination name. Required. + :vartype name: str + :ivar destination_type: Type of destination. Input can be IsolationDomain or Direct. Required. + Known values are: "IsolationDomain" and "Direct". + :vartype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType + :ivar destination_id: The destination Id. ARM Resource ID of either NNI or Internal Networks. + Required. + :vartype destination_id: str + :ivar isolation_domain_properties: Isolation Domain Properties. + :vartype isolation_domain_properties: + ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties + :ivar destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match + configurations. + :vartype destination_tap_rule_id: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Destination name. Required.""" + destination_type: Union[str, "_models.DestinationType"] = rest_field( + name="destinationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of destination. Input can be IsolationDomain or Direct. Required. Known values are: + \"IsolationDomain\" and \"Direct\".""" + destination_id: str = rest_field(name="destinationId", visibility=["read", "create", "update", "delete", "query"]) + """The destination Id. ARM Resource ID of either NNI or Internal Networks. Required.""" + isolation_domain_properties: Optional["_models.IsolationDomainProperties"] = rest_field( + name="isolationDomainProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Isolation Domain Properties.""" + destination_tap_rule_id: Optional[str] = rest_field( + name="destinationTapRuleId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of destination Tap Rule that contains match configurations.""" + + @overload + def __init__( + self, + *, + name: str, + destination_type: Union[str, "_models.DestinationType"], + destination_id: str, + isolation_domain_properties: Optional["_models.IsolationDomainProperties"] = None, + destination_tap_rule_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceInterfaceProperties(_Model): + """Network device interface properties. + + :ivar identifier: Interface identifier. Example: HundredGigE0/0. + :vartype identifier: str + :ivar interface_type: Interface type. + :vartype interface_type: str + :ivar supported_connector_types: List of supported connector types. + :vartype supported_connector_types: + list[~azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties] + """ + + identifier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Interface identifier. Example: HundredGigE0/0.""" + interface_type: Optional[str] = rest_field( + name="interfaceType", visibility=["read", "create", "update", "delete", "query"] + ) + """Interface type.""" + supported_connector_types: Optional[list["_models.SupportedConnectorProperties"]] = rest_field( + name="supportedConnectorTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of supported connector types.""" + + @overload + def __init__( + self, + *, + identifier: Optional[str] = None, + interface_type: Optional[str] = None, + supported_connector_types: Optional[list["_models.SupportedConnectorProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceRoCommand(_Model): + """Provide the RO command. + + :ivar command: Specify the command. + :vartype command: str + """ + + command: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specify the command.""" + + @overload + def __init__( + self, + *, + command: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceRwCommand(_Model): + """Provide the Rw command. + + :ivar command: Specify the command. + :vartype command: str + :ivar command_url: Specify the commands file URL. + :vartype command_url: str + """ + + command: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specify the command.""" + command_url: Optional[str] = rest_field( + name="commandUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify the commands file URL.""" + + @overload + def __init__( + self, + *, + command: Optional[str] = None, + command_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiscardCommitBatchOperationResponse(_Model): + """Discard Commit Batch Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Discard commit batch response properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.DiscardCommitBatchResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Discard commit batch response properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.DiscardCommitBatchResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiscardCommitBatchRequest(_Model): + """Discard Commit Batch Request. + + :ivar commit_batch_id: Commit Batch Identifier. If not provided, the latest commit batch status + will be returned. + :vartype commit_batch_id: str + """ + + commit_batch_id: Optional[str] = rest_field( + name="commitBatchId", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Identifier. If not provided, the latest commit batch status will be returned.""" + + @overload + def __init__( + self, + *, + commit_batch_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiscardCommitBatchResponseProperties(_Model): + """Discard Commit Batch Response Properties. + + :ivar commit_batch_id: Commit Batch Identifier. + :vartype commit_batch_id: str + """ + + commit_batch_id: Optional[str] = rest_field( + name="commitBatchId", visibility=["read", "create", "update", "delete", "query"] + ) + """Commit Batch Identifier.""" + + @overload + def __init__( + self, + *, + commit_batch_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EnableDisableOnResources(_Model): + """Update administrative state on list of resources. + + :ivar resource_ids: Network Fabrics or Network Rack resource Id. + :vartype resource_ids: list[str] + """ + + resource_ids: Optional[list[str]] = rest_field( + name="resourceIds", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabrics or Network Rack resource Id.""" + + @overload + def __init__( + self, + *, + resource_ids: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.managednetworkfabric.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.managednetworkfabric.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] + ) + """The error additional info.""" + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRoutePolicy(_Model): + """Export Route Policy either IPv4 or IPv6. + + :ivar export_ipv4_route_policy_id: ARM resource ID of RoutePolicy. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: ARM resource ID of RoutePolicy. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRoutePolicyInformation(_Model): + """Export Route Policy Configuration. + + :ivar export_ipv4_route_policy_id: Export IPv4 Route Policy Id. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: Export IPv6 Route Policy Id. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Export IPv4 Route Policy Id.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Export IPv6 Route Policy Id.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRoutePolicyInformationPatch(_Model): + """Export Route Policy Configuration. + + :ivar export_ipv4_route_policy_id: Export IPv4 Route Policy Id. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: Export IPv6 Route Policy Id. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Export IPv4 Route Policy Id.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Export IPv6 Route Policy Id.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportRoutePolicyPatch(_Model): + """Export Route Policy either IPv4 or IPv6. + + :ivar export_ipv4_route_policy_id: ARM resource ID of RoutePolicy. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: ARM resource ID of RoutePolicy. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExpressRouteConnectionInformation(_Model): + """The ExpressRoute circuit ID and the Auth Key are required for you to successfully deploy NFC + service. + + :ivar express_route_circuit_id: The express route circuit Azure resource ID, must be of type + Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory + attribute. Required. + :vartype express_route_circuit_id: str + :ivar express_route_authorization_key: Authorization key for the circuit, must be of type + Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. + Required. + :vartype express_route_authorization_key: str + """ + + express_route_circuit_id: str = rest_field( + name="expressRouteCircuitId", visibility=["read", "create", "update", "delete", "query"] + ) + """The express route circuit Azure resource ID, must be of type + Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory + attribute. Required.""" + express_route_authorization_key: str = rest_field( + name="expressRouteAuthorizationKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Authorization key for the circuit, must be of type + Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. + Required.""" + + @overload + def __init__( + self, + *, + express_route_circuit_id: str, + express_route_authorization_key: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + """ + + +class ExternalNetwork(ProxyResource): + """Defines the External Network resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: External Network Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkProperties + """ + + properties: "_models.ExternalNetworkProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """External Network Properties. Required.""" + + __flattened_items = [ + "annotation", + "network_to_network_interconnect_id", + "import_route_policy", + "export_route_policy", + "peering_option", + "option_b_properties", + "option_a_properties", + "static_route_configuration", + "last_operation", + "network_fabric_id", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.ExternalNetworkProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ExternalNetworkBmpPatchProperties(_Model): + """BMP Monitoring Configuration patch properties. + + :ivar configuration_state: BMP Configuration State. Known values are: "Enabled" and "Disabled". + :vartype configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + """ + + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = rest_field( + name="configurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Configuration State. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkBmpProperties(_Model): + """BGP Monitoring Protocol (BMP) Configuration properties. + + :ivar configuration_state: BMP Configuration State. Known values are: "Enabled" and "Disabled". + :vartype configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + """ + + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = rest_field( + name="configurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Configuration State. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkPatch(_Model): + """The ExternalNetwork patch resource definition. + + :ivar properties: External Network Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchProperties + """ + + properties: Optional["_models.ExternalNetworkPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """External Network Patch properties.""" + + __flattened_items = [ + "annotation", + "network_to_network_interconnect_id", + "import_route_policy", + "export_route_policy", + "peering_option", + "option_b_properties", + "option_a_properties", + "static_route_configuration", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ExternalNetworkPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ExternalNetworkPatchProperties(_Model): + """External Network Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str + :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. + :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyPatch + :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyPatch + :ivar peering_option: Peering option list. Known values are: "OptionA" and "OptionB". + :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption + :ivar option_b_properties: option B properties object. + :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBPatchProperties + :ivar option_a_properties: option A properties object. + :vartype option_a_properties: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties + :ivar static_route_configuration: Static Route Configuration. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkStaticRoutePatchConfiguration + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource.""" + import_route_policy: Optional["_models.ImportRoutePolicyPatch"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy either IPv4 or IPv6.""" + export_route_policy: Optional["_models.ExportRoutePolicyPatch"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy either IPv4 or IPv6.""" + peering_option: Optional[Union[str, "_models.PeeringOption"]] = rest_field( + name="peeringOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Peering option list. Known values are: \"OptionA\" and \"OptionB\".""" + option_b_properties: Optional["_models.L3OptionBPatchProperties"] = rest_field( + name="optionBProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option B properties object.""" + option_a_properties: Optional["_models.ExternalNetworkPatchPropertiesOptionAProperties"] = rest_field( + name="optionAProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option A properties object.""" + static_route_configuration: Optional["_models.ExternalNetworkStaticRoutePatchConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + network_to_network_interconnect_id: Optional[str] = None, + import_route_policy: Optional["_models.ImportRoutePolicyPatch"] = None, + export_route_policy: Optional["_models.ExportRoutePolicyPatch"] = None, + peering_option: Optional[Union[str, "_models.PeeringOption"]] = None, + option_b_properties: Optional["_models.L3OptionBPatchProperties"] = None, + option_a_properties: Optional["_models.ExternalNetworkPatchPropertiesOptionAProperties"] = None, + static_route_configuration: Optional["_models.ExternalNetworkStaticRoutePatchConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkPatchPropertiesOptionAProperties(_Model): # pylint: disable=name-too-long + """option A properties object. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar mtu: MTU to use for option A peering. + :vartype mtu: int + :ivar vlan_id: Vlan identifier. Example : 501. + :vartype vlan_id: int + :ivar fabric_asn: Fabric ASN number. Example 65001. + :vartype fabric_asn: int + :ivar peer_asn: Peer ASN number.Example : 28. + :vartype peer_asn: int + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar bmp_configuration: BMP Monitor Configuration. + :vartype bmp_configuration: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkBmpPatchProperties + :ivar v4_over_v6_bgp_session: V4OverV6 BGP Session state. Known values are: "Enabled" and + "Disabled". + :vartype v4_over_v6_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V4OverV6BgpSessionState + :ivar v6_over_v4_bgp_session: V6OverV4 BGP Session state. Known values are: "Enabled" and + "Disabled". + :vartype v6_over_v4_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V6OverV4BgpSessionState + :ivar native_ipv4_prefix_limit: Native IPv4 prefix limit configuration. + :vartype native_ipv4_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties + :ivar native_ipv6_prefix_limit: Native IPv6 prefix limit configuration. + :vartype native_ipv6_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties + """ + + primary_ipv4_prefix: Optional[str] = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: Optional[str] = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU to use for option A peering.""" + vlan_id: Optional[int] = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan identifier. Example : 501.""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """Fabric ASN number. Example 65001.""" + peer_asn: Optional[int] = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN number.Example : 28.""" + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + bmp_configuration: Optional["_models.ExternalNetworkBmpPatchProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Monitor Configuration.""" + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = rest_field( + name="v4OverV6BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V4OverV6 BGP Session state. Known values are: \"Enabled\" and \"Disabled\".""" + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = rest_field( + name="v6OverV4BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V6OverV4 BGP Session state. Known values are: \"Enabled\" and \"Disabled\".""" + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitPatchProperties"] = rest_field( + name="nativeIpv4PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv4 prefix limit configuration.""" + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitPatchProperties"] = rest_field( + name="nativeIpv6PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv6 prefix limit configuration.""" + + @overload + def __init__( + self, + *, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + mtu: Optional[int] = None, + vlan_id: Optional[int] = None, + peer_asn: Optional[int] = None, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ingress_acl_id: Optional[str] = None, + egress_acl_id: Optional[str] = None, + bmp_configuration: Optional["_models.ExternalNetworkBmpPatchProperties"] = None, + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = None, + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = None, + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitPatchProperties"] = None, + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkProperties(_Model): + """External Network Properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the ExternalNetwork resource. + :vartype network_to_network_interconnect_id: str + :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. + :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy + :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy + :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". + :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption + :ivar option_b_properties: option B properties object. + :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties + :ivar option_a_properties: option A properties object. + :vartype option_a_properties: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties + :ivar static_route_configuration: Static Route Configuration. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkStaticRouteConfiguration + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar network_fabric_id: Associated Network Fabric Resource ID. + :vartype network_fabric_id: str + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the networkToNetworkInterconnectId of the ExternalNetwork resource.""" + import_route_policy: Optional["_models.ImportRoutePolicy"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy either IPv4 or IPv6.""" + export_route_policy: Optional["_models.ExportRoutePolicy"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy either IPv4 or IPv6.""" + peering_option: Union[str, "_models.PeeringOption"] = rest_field( + name="peeringOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Peering option list. Required. Known values are: \"OptionA\" and \"OptionB\".""" + option_b_properties: Optional["_models.L3OptionBProperties"] = rest_field( + name="optionBProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option B properties object.""" + option_a_properties: Optional["_models.ExternalNetworkPropertiesOptionAProperties"] = rest_field( + name="optionAProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option A properties object.""" + static_route_configuration: Optional["_models.ExternalNetworkStaticRouteConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """Associated Network Fabric Resource ID.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + peering_option: Union[str, "_models.PeeringOption"], + annotation: Optional[str] = None, + network_to_network_interconnect_id: Optional[str] = None, + import_route_policy: Optional["_models.ImportRoutePolicy"] = None, + export_route_policy: Optional["_models.ExportRoutePolicy"] = None, + option_b_properties: Optional["_models.L3OptionBProperties"] = None, + option_a_properties: Optional["_models.ExternalNetworkPropertiesOptionAProperties"] = None, + static_route_configuration: Optional["_models.ExternalNetworkStaticRouteConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkPropertiesOptionAProperties(_Model): # pylint: disable=name-too-long + """option A properties object. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar mtu: MTU to use for option A peering. + :vartype mtu: int + :ivar vlan_id: Vlan identifier. Example : 501. Required. + :vartype vlan_id: int + :ivar fabric_asn: Fabric ASN number. Example 65001. + :vartype fabric_asn: int + :ivar peer_asn: Peer ASN number.Example : 28. Required. + :vartype peer_asn: int + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar bmp_configuration: BMP Monitor Configuration. + :vartype bmp_configuration: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkBmpProperties + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar v4_over_v6_bgp_session: V4OverV6 BGP Session state. Known values are: "Enabled" and + "Disabled". + :vartype v4_over_v6_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V4OverV6BgpSessionState + :ivar v6_over_v4_bgp_session: V6OverV4 BGP Session state. Known values are: "Enabled" and + "Disabled". + :vartype v6_over_v4_bgp_session: str or + ~azure.mgmt.managednetworkfabric.models.V6OverV4BgpSessionState + :ivar native_ipv4_prefix_limit: Native IPv4 prefix limits configuration. + :vartype native_ipv4_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitProperties + :ivar native_ipv6_prefix_limit: Native IPv6 prefix limits configuration. + :vartype native_ipv6_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitProperties + """ + + primary_ipv4_prefix: Optional[str] = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: Optional[str] = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU to use for option A peering.""" + vlan_id: int = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan identifier. Example : 501. Required.""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """Fabric ASN number. Example 65001.""" + peer_asn: int = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN number.Example : 28. Required.""" + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + bmp_configuration: Optional["_models.ExternalNetworkBmpProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Monitor Configuration.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = rest_field( + name="v4OverV6BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V4OverV6 BGP Session state. Known values are: \"Enabled\" and \"Disabled\".""" + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = rest_field( + name="v6OverV4BgpSession", visibility=["read", "create", "update", "delete", "query"] + ) + """V6OverV4 BGP Session state. Known values are: \"Enabled\" and \"Disabled\".""" + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitProperties"] = rest_field( + name="nativeIpv4PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv4 prefix limits configuration.""" + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitProperties"] = rest_field( + name="nativeIpv6PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv6 prefix limits configuration.""" + + @overload + def __init__( + self, + *, + vlan_id: int, + peer_asn: int, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + mtu: Optional[int] = None, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ingress_acl_id: Optional[str] = None, + bmp_configuration: Optional["_models.ExternalNetworkBmpProperties"] = None, + egress_acl_id: Optional[str] = None, + v4_over_v6_bgp_session: Optional[Union[str, "_models.V4OverV6BgpSessionState"]] = None, + v6_over_v4_bgp_session: Optional[Union[str, "_models.V6OverV4BgpSessionState"]] = None, + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitProperties"] = None, + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkStaticRouteConfiguration(_Model): + """Static Route Configuration properties for ExternalNetwork. + + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + """ + + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkStaticRoutePatchConfiguration(_Model): # pylint: disable=name-too-long + """Static Route Configuration properties for External Network. + + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + """ + + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkUpdateBfdAdministrativeStateRequest(_Model): # pylint: disable=name-too-long + """External Network Update Administrative State request. + + :ivar route_type: Route Type that helps to know which bfd we are updating. Known values are: + "Static" and "OptionA". + :vartype route_type: str or ~azure.mgmt.managednetworkfabric.models.ExternalNetworkRouteType + :ivar administrative_state: Administrative state. Known values are: "Enabled", "Disabled", + "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + """ + + route_type: Optional[Union[str, "_models.ExternalNetworkRouteType"]] = rest_field( + name="routeType", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Type that helps to know which bfd we are updating. Known values are: \"Static\" and + \"OptionA\".""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """Administrative state. Known values are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + + @overload + def __init__( + self, + *, + route_type: Optional[Union[str, "_models.ExternalNetworkRouteType"]] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkUpdateBfdAdministrativeStateResponse(_Model): # pylint: disable=name-too-long + """External Network Update Administrative State response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Response properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Response properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExternalNetworkUpdateBfdAdministrativeStateResponseProperties(_Model): # pylint: disable=name-too-long + """Response properties for External Network BFD Administrative State. + + :ivar route_type: Route Type that helps to know which bfd we are updating. Known values are: + "Static" and "OptionA". + :vartype route_type: str or ~azure.mgmt.managednetworkfabric.models.ExternalNetworkRouteType + :ivar administrative_state: Administrative state. Known values are: "Enabled", "Disabled", + "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + """ + + route_type: Optional[Union[str, "_models.ExternalNetworkRouteType"]] = rest_field( + name="routeType", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Type that helps to know which bfd we are updating. Known values are: \"Static\" and + \"OptionA\".""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """Administrative state. Known values are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + + @overload + def __init__( + self, + *, + route_type: Optional[Union[str, "_models.ExternalNetworkRouteType"]] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FabricLockProperties(_Model): + """Network Fabric Lock Configuration. + + :ivar lock_state: NetworkFabric Lock State. Known values are: "Enabled" and "Disabled". + :vartype lock_state: str or ~azure.mgmt.managednetworkfabric.models.LockConfigurationState + :ivar lock_type: NetworkFabric Lock Type. Known values are: "Administrative" and + "Configuration". + :vartype lock_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockType + """ + + lock_state: Optional[Union[str, "_models.LockConfigurationState"]] = rest_field( + name="lockState", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric Lock State. Known values are: \"Enabled\" and \"Disabled\".""" + lock_type: Optional[Union[str, "_models.NetworkFabricLockType"]] = rest_field( + name="lockType", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric Lock Type. Known values are: \"Administrative\" and \"Configuration\".""" + + @overload + def __init__( + self, + *, + lock_state: Optional[Union[str, "_models.LockConfigurationState"]] = None, + lock_type: Optional[Union[str, "_models.NetworkFabricLockType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FeatureFlagProperties(_Model): + """Feature flag properties. + + :ivar feature_flag_name: Feature flag name. + :vartype feature_flag_name: str + :ivar feature_flag_value: Feature flag value. + :vartype feature_flag_value: str + """ + + feature_flag_name: Optional[str] = rest_field( + name="featureFlagName", visibility=["read", "create", "update", "delete", "query"] + ) + """Feature flag name.""" + feature_flag_value: Optional[str] = rest_field( + name="featureFlagValue", visibility=["read", "create", "update", "delete", "query"] + ) + """Feature flag value.""" + + @overload + def __init__( + self, + *, + feature_flag_name: Optional[str] = None, + feature_flag_value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetTopologyResponse(_Model): + """GetTopology Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Properties of the GetTopology Response. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.GetTopologyResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.GetTopologyResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the GetTopology Response.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.GetTopologyResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetTopologyResponseProperties(_Model): + """Properties of the GetTopology Response. + + :ivar url: Topology JSON string. + :vartype url: str + """ + + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Topology JSON string.""" + + @overload + def __init__( + self, + *, + url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalAccessControlListActionPatchProperties(_Model): # pylint: disable=name-too-long + """Global Access Control List actions patch properties. + + :ivar enable_count: Configuration to enable or disable ACL action count. Known values are: + "True" and "False". + :vartype enable_count: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + """ + + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="enableCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to enable or disable ACL action count. Known values are: \"True\" and \"False\".""" + + @overload + def __init__( + self, + *, + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalAccessControlListActionProperties(_Model): + """Global Access Control List actions properties. + + :ivar enable_count: Configuration to enable or disable ACL action count. Known values are: + "True" and "False". + :vartype enable_count: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + """ + + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="enableCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to enable or disable ACL action count. Known values are: \"True\" and \"False\".""" + + @overload + def __init__( + self, + *, + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalNetworkTapRuleActionPatchProperties(_Model): # pylint: disable=name-too-long + """Global network tap rule actions patch properties. + + :ivar enable_count: Configuration to enable network tap rule counter. Known values are: "True" + and "False". + :vartype enable_count: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar truncate: Truncate. 0 indicates do not truncate. + :vartype truncate: str + """ + + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="enableCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to enable network tap rule counter. Known values are: \"True\" and \"False\".""" + truncate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Truncate. 0 indicates do not truncate.""" + + @overload + def __init__( + self, + *, + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + truncate: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GlobalNetworkTapRuleActionProperties(_Model): + """Global network tap rule actions properties. + + :ivar enable_count: Configuration to enable network tap rule counter. Known values are: "True" + and "False". + :vartype enable_count: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar truncate: Truncate. 0 indicates do not truncate. + :vartype truncate: str + """ + + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="enableCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to enable network tap rule counter. Known values are: \"True\" and \"False\".""" + truncate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Truncate. 0 indicates do not truncate.""" + + @overload + def __init__( + self, + *, + enable_count: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + truncate: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HeaderAddressProperties(_Model): + """Header name and source addresses associated with the header. + + :ivar header_name: Name of the header. + :vartype header_name: str + :ivar address_list: List of source remote IP to be allowed or denied. + :vartype address_list: list[str] + """ + + header_name: Optional[str] = rest_field( + name="headerName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the header.""" + address_list: Optional[list[str]] = rest_field( + name="addressList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of source remote IP to be allowed or denied.""" + + @overload + def __init__( + self, + *, + header_name: Optional[str] = None, + address_list: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IcmpConfigurationPatchProperties(_Model): + """Internet Control Message Protocol (ICMP) configuration patch properties. + + :ivar icmp_types: Internet Control Message Protocol (ICMP) types. + :vartype icmp_types: list[str] + """ + + icmp_types: Optional[list[str]] = rest_field( + name="icmpTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) types.""" + + @overload + def __init__( + self, + *, + icmp_types: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IcmpConfigurationProperties(_Model): + """Internet Control Message Protocol (ICMP) configuration. + + :ivar icmp_types: Internet Control Message Protocol (ICMP) types. + :vartype icmp_types: list[str] + """ + + icmp_types: Optional[list[str]] = rest_field( + name="icmpTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Internet Control Message Protocol (ICMP) types.""" + + @overload + def __init__( + self, + *, + icmp_types: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentitySelector(_Model): + """IdentitySelector represents the selection of a managed identity for use. + + :ivar identity_type: The type of managed identity that is being selected. Required. Known + values are: "SystemAssignedIdentity" and "UserAssignedIdentity". + :vartype identity_type: str or + ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentitySelectorType + :ivar user_assigned_identity_resource_id: The user assigned managed identity resource ID to + use. Mutually exclusive with a system assigned identity type. + :vartype user_assigned_identity_resource_id: str + """ + + identity_type: Union[str, "_models.ManagedServiceIdentitySelectorType"] = rest_field( + name="identityType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity that is being selected. Required. Known values are: + \"SystemAssignedIdentity\" and \"UserAssignedIdentity\".""" + user_assigned_identity_resource_id: Optional[str] = rest_field( + name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The user assigned managed identity resource ID to use. Mutually exclusive with a system + assigned identity type.""" + + @overload + def __init__( + self, + *, + identity_type: Union[str, "_models.ManagedServiceIdentitySelectorType"], + user_assigned_identity_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentitySelectorPatch(_Model): + """IdentitySelector represents the selection of a managed identity for use. + + :ivar identity_type: The type of managed identity that is being selected. Known values are: + "SystemAssignedIdentity" and "UserAssignedIdentity". + :vartype identity_type: str or + ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentitySelectorType + :ivar user_assigned_identity_resource_id: The user assigned managed identity resource ID to + use. Mutually exclusive with a system assigned identity type. + :vartype user_assigned_identity_resource_id: str + """ + + identity_type: Optional[Union[str, "_models.ManagedServiceIdentitySelectorType"]] = rest_field( + name="identityType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity that is being selected. Known values are: + \"SystemAssignedIdentity\" and \"UserAssignedIdentity\".""" + user_assigned_identity_resource_id: Optional[str] = rest_field( + name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The user assigned managed identity resource ID to use. Mutually exclusive with a system + assigned identity type.""" + + @overload + def __init__( + self, + *, + identity_type: Optional[Union[str, "_models.ManagedServiceIdentitySelectorType"]] = None, + user_assigned_identity_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImportRoutePolicy(_Model): + """Import Route Policy either IPv4 or IPv6. + + :ivar import_ipv4_route_policy_id: ARM resource ID of RoutePolicy. + :vartype import_ipv4_route_policy_id: str + :ivar import_ipv6_route_policy_id: ARM resource ID of RoutePolicy. + :vartype import_ipv6_route_policy_id: str + """ + + import_ipv4_route_policy_id: Optional[str] = rest_field( + name="importIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + import_ipv6_route_policy_id: Optional[str] = rest_field( + name="importIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_policy_id: Optional[str] = None, + import_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImportRoutePolicyInformation(_Model): + """Import Route Policy Configuration. + + :ivar import_ipv4_route_policy_id: Import IPv4 Route Policy Id. + :vartype import_ipv4_route_policy_id: str + :ivar import_ipv6_route_policy_id: Import IPv6 Route Policy Id. + :vartype import_ipv6_route_policy_id: str + """ + + import_ipv4_route_policy_id: Optional[str] = rest_field( + name="importIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Import IPv4 Route Policy Id.""" + import_ipv6_route_policy_id: Optional[str] = rest_field( + name="importIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Import IPv6 Route Policy Id.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_policy_id: Optional[str] = None, + import_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImportRoutePolicyInformationPatch(_Model): + """Import Route Policy Configuration. + + :ivar import_ipv4_route_policy_id: Import IPv4 Route Policy Id. + :vartype import_ipv4_route_policy_id: str + :ivar import_ipv6_route_policy_id: Import IPv6 Route Policy Id. + :vartype import_ipv6_route_policy_id: str + """ + + import_ipv4_route_policy_id: Optional[str] = rest_field( + name="importIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Import IPv4 Route Policy Id.""" + import_ipv6_route_policy_id: Optional[str] = rest_field( + name="importIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """Import IPv6 Route Policy Id.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_policy_id: Optional[str] = None, + import_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImportRoutePolicyPatch(_Model): + """Import Route Policy either IPv4 or IPv6. + + :ivar import_ipv4_route_policy_id: ARM resource ID of RoutePolicy. + :vartype import_ipv4_route_policy_id: str + :ivar import_ipv6_route_policy_id: ARM resource ID of RoutePolicy. + :vartype import_ipv6_route_policy_id: str + """ + + import_ipv4_route_policy_id: Optional[str] = rest_field( + name="importIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + import_ipv6_route_policy_id: Optional[str] = rest_field( + name="importIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of RoutePolicy.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_policy_id: Optional[str] = None, + import_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetwork(ProxyResource): + """Defines the Internal Network resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The Internal Network Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.InternalNetworkProperties + """ + + properties: "_models.InternalNetworkProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Internal Network Properties. Required.""" + + __flattened_items = [ + "annotation", + "extension", + "mtu", + "connected_i_pv4_subnets", + "connected_i_pv6_subnets", + "import_route_policy", + "export_route_policy", + "ingress_acl_id", + "egress_acl_id", + "is_monitoring_enabled", + "vlan_id", + "bgp_configuration", + "static_route_configuration", + "native_ipv4_prefix_limit", + "native_ipv6_prefix_limit", + "last_operation", + "network_fabric_id", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.InternalNetworkProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class InternalNetworkBmpPatchProperties(_Model): + """Internal Network BMP Configuration. + + :ivar neighbor_ip_exclusions: Neighbor IP Address exclusions for BMP. + :vartype neighbor_ip_exclusions: list[str] + :ivar bmp_configuration_state: BMP Monitoring configuration state. Known values are: "Enabled" + and "Disabled". + :vartype bmp_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + """ + + neighbor_ip_exclusions: Optional[list[str]] = rest_field( + name="neighborIpExclusions", visibility=["read", "create", "update", "delete", "query"] + ) + """Neighbor IP Address exclusions for BMP.""" + bmp_configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = rest_field( + name="bmpConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Monitoring configuration state. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + neighbor_ip_exclusions: Optional[list[str]] = None, + bmp_configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkBmpProperties(_Model): + """Internal Network BMP Configuration. + + :ivar neighbor_ip_exclusions: BMP Collector Address. + :vartype neighbor_ip_exclusions: list[str] + :ivar bmp_configuration_state: BMP Monitoring configuration state. Known values are: "Enabled" + and "Disabled". + :vartype bmp_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + :ivar export_policy_configuration: BMP Export Policy configuration. + :vartype export_policy_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpExportPolicyProperties + """ + + neighbor_ip_exclusions: Optional[list[str]] = rest_field( + name="neighborIpExclusions", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Collector Address.""" + bmp_configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = rest_field( + name="bmpConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Monitoring configuration state. Known values are: \"Enabled\" and \"Disabled\".""" + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = rest_field( + name="exportPolicyConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Export Policy configuration.""" + + @overload + def __init__( + self, + *, + neighbor_ip_exclusions: Optional[list[str]] = None, + bmp_configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = None, + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkPatch(_Model): + """The InternalNetwork patch resource definition. + + :ivar properties: InternalNetwork Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatchProperties + """ + + properties: Optional["_models.InternalNetworkPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """InternalNetwork Patch properties.""" + + __flattened_items = [ + "annotation", + "mtu", + "connected_i_pv4_subnets", + "connected_i_pv6_subnets", + "import_route_policy", + "export_route_policy", + "ingress_acl_id", + "egress_acl_id", + "is_monitoring_enabled", + "bgp_configuration", + "static_route_configuration", + "native_ipv4_prefix_limit", + "native_ipv6_prefix_limit", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.InternalNetworkPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class InternalNetworkPatchProperties(_Model): + """InternalNetwork Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar mtu: Maximum transmission unit. Default value is 1500. + :vartype mtu: int + :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. + :vartype connected_i_pv4_subnets: + list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnetPatch] + :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. + :vartype connected_i_pv6_subnets: + list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnetPatch] + :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. + :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy + :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. + Known values are: "True" and "False". + :vartype is_monitoring_enabled: str or + ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled + :ivar bgp_configuration: BGP configuration properties. + :vartype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpPatchConfiguration + :ivar static_route_configuration: Static Route Configuration properties. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.StaticRoutePatchConfiguration + :ivar native_ipv4_prefix_limit: Native IPv4 Prefix Limit Configuration properties. + :vartype native_ipv4_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitPatchProperties + :ivar native_ipv6_prefix_limit: Native IPv6 Prefix Limit Configuration properties. + :vartype native_ipv6_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitPatchProperties + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum transmission unit. Default value is 1500.""" + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnetPatch"]] = rest_field( + name="connectedIPv4Subnets", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Connected IPv4 Subnets.""" + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnetPatch"]] = rest_field( + name="connectedIPv6Subnets", visibility=["read", "create", "update", "delete", "query"] + ) + """List of connected IPv6 Subnets.""" + import_route_policy: Optional["_models.ImportRoutePolicy"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy either IPv4 or IPv6.""" + export_route_policy: Optional["_models.ExportRoutePolicy"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy either IPv4 or IPv6.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + is_monitoring_enabled: Optional[Union[str, "_models.IsMonitoringEnabled"]] = rest_field( + name="isMonitoringEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """To check whether monitoring of internal network is enabled or not. Known values are: \"True\" + and \"False\".""" + bgp_configuration: Optional["_models.BgpPatchConfiguration"] = rest_field( + name="bgpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP configuration properties.""" + static_route_configuration: Optional["_models.StaticRoutePatchConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration properties.""" + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitPatchProperties"] = rest_field( + name="nativeIpv4PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv4 Prefix Limit Configuration properties.""" + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitPatchProperties"] = rest_field( + name="nativeIpv6PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv6 Prefix Limit Configuration properties.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + mtu: Optional[int] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnetPatch"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnetPatch"]] = None, + import_route_policy: Optional["_models.ImportRoutePolicy"] = None, + export_route_policy: Optional["_models.ExportRoutePolicy"] = None, + ingress_acl_id: Optional[str] = None, + egress_acl_id: Optional[str] = None, + is_monitoring_enabled: Optional[Union[str, "_models.IsMonitoringEnabled"]] = None, + bgp_configuration: Optional["_models.BgpPatchConfiguration"] = None, + static_route_configuration: Optional["_models.StaticRoutePatchConfiguration"] = None, + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitPatchProperties"] = None, + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkProperties(_Model): + """Internal Network Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and + "NPB". + :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension + :ivar mtu: Maximum transmission unit. Default value is 1500. + :vartype mtu: int + :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. + :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] + :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. + :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] + :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. + :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy + :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. + Known values are: "True" and "False". + :vartype is_monitoring_enabled: str or + ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled + :ivar vlan_id: Vlan identifier. Example: 1001. Required. + :vartype vlan_id: int + :ivar bgp_configuration: BGP configuration properties. + :vartype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpConfiguration + :ivar static_route_configuration: Static Route Configuration properties. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration + :ivar native_ipv4_prefix_limit: Native IPv4 Prefix Limit Configuration properties. + :vartype native_ipv4_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv4PrefixLimitProperties + :ivar native_ipv6_prefix_limit: Native IPv6 Prefix Limit Configuration properties. + :vartype native_ipv6_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.NativeIpv6PrefixLimitProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar network_fabric_id: Associated Network Fabric Resource ID. + :vartype network_fabric_id: str + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + extension: Optional[Union[str, "_models.Extension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Extension. Example: NoExtension | NPB. Known values are: \"NoExtension\" and \"NPB\".""" + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum transmission unit. Default value is 1500.""" + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = rest_field( + name="connectedIPv4Subnets", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Connected IPv4 Subnets.""" + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = rest_field( + name="connectedIPv6Subnets", visibility=["read", "create", "update", "delete", "query"] + ) + """List of connected IPv6 Subnets.""" + import_route_policy: Optional["_models.ImportRoutePolicy"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy either IPv4 or IPv6.""" + export_route_policy: Optional["_models.ExportRoutePolicy"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy either IPv4 or IPv6.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + is_monitoring_enabled: Optional[Union[str, "_models.IsMonitoringEnabled"]] = rest_field( + name="isMonitoringEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """To check whether monitoring of internal network is enabled or not. Known values are: \"True\" + and \"False\".""" + vlan_id: int = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan identifier. Example: 1001. Required.""" + bgp_configuration: Optional["_models.BgpConfiguration"] = rest_field( + name="bgpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP configuration properties.""" + static_route_configuration: Optional["_models.StaticRouteConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration properties.""" + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitProperties"] = rest_field( + name="nativeIpv4PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv4 Prefix Limit Configuration properties.""" + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitProperties"] = rest_field( + name="nativeIpv6PrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """Native IPv6 Prefix Limit Configuration properties.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """Associated Network Fabric Resource ID.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + vlan_id: int, + annotation: Optional[str] = None, + extension: Optional[Union[str, "_models.Extension"]] = None, + mtu: Optional[int] = None, + connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, + import_route_policy: Optional["_models.ImportRoutePolicy"] = None, + export_route_policy: Optional["_models.ExportRoutePolicy"] = None, + ingress_acl_id: Optional[str] = None, + egress_acl_id: Optional[str] = None, + is_monitoring_enabled: Optional[Union[str, "_models.IsMonitoringEnabled"]] = None, + bgp_configuration: Optional["_models.BgpConfiguration"] = None, + static_route_configuration: Optional["_models.StaticRouteConfiguration"] = None, + native_ipv4_prefix_limit: Optional["_models.NativeIpv4PrefixLimitProperties"] = None, + native_ipv6_prefix_limit: Optional["_models.NativeIpv6PrefixLimitProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBfdAdministrativeStateRequest(_Model): # pylint: disable=name-too-long + """Internal Network BFD Administrative State request. + + :ivar route_type: Route Type that helps to know which bfd we are updating. Known values are: + "Static" and "Bgp". + :vartype route_type: str or ~azure.mgmt.managednetworkfabric.models.InternalNetworkRouteType + :ivar neighbor_address: NeighborAddress - Input should be either All or Specific Ipv4 Address + or Specific Ipv6 Address. + :vartype neighbor_address: str + :ivar administrative_state: BFD Administrative state. Known values are: "Enabled", "Disabled", + "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + """ + + route_type: Optional[Union[str, "_models.InternalNetworkRouteType"]] = rest_field( + name="routeType", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Type that helps to know which bfd we are updating. Known values are: \"Static\" and + \"Bgp\".""" + neighbor_address: Optional[str] = rest_field( + name="neighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address.""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Administrative state. Known values are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + + @overload + def __init__( + self, + *, + route_type: Optional[Union[str, "_models.InternalNetworkRouteType"]] = None, + neighbor_address: Optional[str] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBfdAdministrativeStateResponse(_Model): # pylint: disable=name-too-long + """Internal Network BFD Administrative State response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Internal Network BFD Administrative State response properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Internal Network BFD Administrative State response properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBfdAdministrativeStateResponseProperties(_Model): # pylint: disable=name-too-long + """Internal Network BFD Administrative State response properties. + + :ivar neighbor_address_administrative_status: NeighborAddress administrative status. + :vartype neighbor_address_administrative_status: + list[~azure.mgmt.managednetworkfabric.models.NeighborAddressBfdAdministrativeStatus] + """ + + neighbor_address_administrative_status: Optional[list["_models.NeighborAddressBfdAdministrativeStatus"]] = ( + rest_field( + name="neighborAddressAdministrativeStatus", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """NeighborAddress administrative status.""" + + @overload + def __init__( + self, + *, + neighbor_address_administrative_status: Optional[list["_models.NeighborAddressBfdAdministrativeStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBgpAdministrativeStateRequest(_Model): # pylint: disable=name-too-long + """Internal Network Administrative State Request. + + :ivar neighbor_address: NeighborAddress - Input should be either All or Specific Ipv4 Address + or Specific Ipv6 Address. + :vartype neighbor_address: str + :ivar administrative_state: BGP Administrative state. Known values are: "Enabled" and + "Disabled". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BgpAdministrativeState + """ + + neighbor_address: Optional[str] = rest_field( + name="neighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address.""" + administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Administrative state. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + neighbor_address: Optional[str] = None, + administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBgpAdministrativeStateResponse(_Model): # pylint: disable=name-too-long + """Internal Network Administrative State Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Internal Network BGP Administrative State response properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Internal Network BGP Administrative State response properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternalNetworkUpdateBgpAdministrativeStateResponseProperties(_Model): # pylint: disable=name-too-long + """Internal Network BGP Administrative State response properties. + + :ivar neighbor_address_administrative_status: NeighborAddress administrative status. + :vartype neighbor_address_administrative_status: + list[~azure.mgmt.managednetworkfabric.models.NeighborAddressBgpAdministrativeStatus] + """ + + neighbor_address_administrative_status: Optional[list["_models.NeighborAddressBgpAdministrativeStatus"]] = ( + rest_field( + name="neighborAddressAdministrativeStatus", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """NeighborAddress administrative status.""" + + @overload + def __init__( + self, + *, + neighbor_address_administrative_status: Optional[list["_models.NeighborAddressBgpAdministrativeStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternetGateway(TrackedResource): + """The Internet Gateway resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The Internet Gateway Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.InternetGatewayProperties + """ + + properties: "_models.InternetGatewayProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Internet Gateway Properties. Required.""" + + __flattened_items = [ + "annotation", + "internet_gateway_rule_id", + "ipv4_address", + "port", + "type", + "internet_gateway_type", + "network_fabric_controller_id", + "last_operation", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.InternetGatewayProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class InternetGatewayPatch(TagsUpdate): + """The Internet Gateway patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatchProperties + """ + + properties: Optional["_models.InternetGatewayPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["internet_gateway_rule_id"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.InternetGatewayPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class InternetGatewayPatchProperties(_Model): + """PatchProperties for InternetGateway. + + :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. + :vartype internet_gateway_rule_id: str + """ + + internet_gateway_rule_id: Optional[str] = rest_field( + name="internetGatewayRuleId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Internet Gateway Rule.""" + + @overload + def __init__( + self, + *, + internet_gateway_rule_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternetGatewayProperties(_Model): + """Internet Gateway Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. + :vartype internet_gateway_rule_id: str + :ivar ipv4_address: IPv4 Address of Internet Gateway. + :vartype ipv4_address: str + :ivar port: Port number of Internet Gateway. + :vartype port: int + :ivar type: Gateway Type of the resource. Known values are: "Infrastructure" and "Workload". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType + :ivar internet_gateway_type: Gateway Type of the resource. Known values are: "Infrastructure" + and "Workload". + :vartype internet_gateway_type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType + :ivar network_fabric_controller_id: ARM Resource ID of the Network Fabric Controller. Required. + :vartype network_fabric_controller_id: str + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: Provisioning state of resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + internet_gateway_rule_id: Optional[str] = rest_field( + name="internetGatewayRuleId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Internet Gateway Rule.""" + ipv4_address: Optional[str] = rest_field(name="ipv4Address", visibility=["read"]) + """IPv4 Address of Internet Gateway.""" + port: Optional[int] = rest_field(visibility=["read"]) + """Port number of Internet Gateway.""" + type: Optional[Union[str, "_models.GatewayType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway Type of the resource. Known values are: \"Infrastructure\" and \"Workload\".""" + internet_gateway_type: Optional[Union[str, "_models.GatewayType"]] = rest_field( + name="internetGatewayType", visibility=["read", "create", "update", "delete", "query"] + ) + """Gateway Type of the resource. Known values are: \"Infrastructure\" and \"Workload\".""" + network_fabric_controller_id: str = rest_field( + name="networkFabricControllerId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Network Fabric Controller. Required.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of resource. Known values are: \"Accepted\", \"Succeeded\", \"Updating\", + \"Deleting\", \"Failed\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + network_fabric_controller_id: str, + annotation: Optional[str] = None, + internet_gateway_rule_id: Optional[str] = None, + type: Optional[Union[str, "_models.GatewayType"]] = None, + internet_gateway_type: Optional[Union[str, "_models.GatewayType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternetGatewayRule(TrackedResource): + """The Internet Gateway Rule resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The Internet Gateway Rule properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRuleProperties + """ + + properties: "_models.InternetGatewayRuleProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Internet Gateway Rule properties. Required.""" + + __flattened_items = [ + "annotation", + "rule_properties", + "last_operation", + "provisioning_state", + "internet_gateway_ids", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.InternetGatewayRuleProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class InternetGatewayRulePatch(_Model): + """The Internet Gateway Rules patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class InternetGatewayRuleProperties(AnnotationResource): + """Internet Gateway Rule Properties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar rule_properties: Rules for the InternetGateways. Required. + :vartype rule_properties: ~azure.mgmt.managednetworkfabric.models.RuleProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar internet_gateway_ids: List of Internet Gateway resource Id. + :vartype internet_gateway_ids: list[str] + """ + + rule_properties: "_models.RuleProperties" = rest_field( + name="ruleProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Rules for the InternetGateways. Required.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + internet_gateway_ids: Optional[list[str]] = rest_field(name="internetGatewayIds", visibility=["read"]) + """List of Internet Gateway resource Id.""" + + @overload + def __init__( + self, + *, + rule_properties: "_models.RuleProperties", + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpCommunity(TrackedResource): + """The IP Community resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The IP Community Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpCommunityProperties + """ + + properties: "_models.IpCommunityProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The IP Community Properties. Required.""" + + __flattened_items = [ + "annotation", + "network_fabric_id", + "ip_community_rules", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.IpCommunityProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpCommunityIdList(_Model): + """IP Community ID list properties. + + :ivar ip_community_ids: List of IP Community resource IDs. + :vartype ip_community_ids: list[str] + """ + + ip_community_ids: Optional[list[str]] = rest_field( + name="ipCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community resource IDs.""" + + @overload + def __init__( + self, + *, + ip_community_ids: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpCommunityPatch(TagsUpdate): + """The IP Community patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: IP Community patchable properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatchableProperties + """ + + properties: Optional["_models.IpCommunityPatchableProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Community patchable properties.""" + + __flattened_items = ["ip_community_rules"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.IpCommunityPatchableProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpCommunityPatchableProperties(_Model): + """IP Community patchable properties. + + :ivar ip_community_rules: List of IP Community Rules. + :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] + """ + + ip_community_rules: Optional[list["_models.IpCommunityRule"]] = rest_field( + name="ipCommunityRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community Rules.""" + + @overload + def __init__( + self, + *, + ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpCommunityProperties(_Model): + """IP Community Properties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_fabric_id: ARM Resource ID of the Network Fabric. + :vartype network_fabric_id: str + :ivar ip_community_rules: List of IP Community Rules. Required. + :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """ARM Resource ID of the Network Fabric.""" + ip_community_rules: list["_models.IpCommunityRule"] = rest_field( + name="ipCommunityRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community Rules. Required.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + ip_community_rules: list["_models.IpCommunityRule"], + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpCommunityRule(_Model): + """IP Community patchable properties. + + :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known + values are: "Permit" and "Deny". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are + evaluated starting with the lowest sequence number and continue down the list until a match is + made. Once a match is made, the permit or deny statement is applied to that network and the + rest of the list is ignored. Required. + :vartype sequence_number: int + :ivar well_known_communities: Supported well known Community List. + :vartype well_known_communities: list[str or + ~azure.mgmt.managednetworkfabric.models.WellKnownCommunities] + :ivar community_members: List the community members of IP Community. Required. + :vartype community_members: list[str] + """ + + action: Union[str, "_models.CommunityActionTypes"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: + \"Permit\" and \"Deny\".""" + sequence_number: int = rest_field(name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"]) + """Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the + lowest sequence number and continue down the list until a match is made. Once a match is made, + the permit or deny statement is applied to that network and the rest of the list is ignored. + Required.""" + well_known_communities: Optional[list[Union[str, "_models.WellKnownCommunities"]]] = rest_field( + name="wellKnownCommunities", visibility=["read", "create", "update", "delete", "query"] + ) + """Supported well known Community List.""" + community_members: list[str] = rest_field( + name="communityMembers", visibility=["read", "create", "update", "delete", "query"] + ) + """List the community members of IP Community. Required.""" + + @overload + def __init__( + self, + *, + action: Union[str, "_models.CommunityActionTypes"], + sequence_number: int, + community_members: list[str], + well_known_communities: Optional[list[Union[str, "_models.WellKnownCommunities"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpExtendedCommunity(TrackedResource): + """The IP Extended Community resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The IpExtendedCommunity properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityProperties + """ + + properties: "_models.IpExtendedCommunityProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The IpExtendedCommunity properties. Required.""" + + __flattened_items = [ + "annotation", + "ip_extended_community_rules", + "network_fabric_id", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.IpExtendedCommunityProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpExtendedCommunityIdList(_Model): + """IP Extended Community Id list properties. + + :ivar ip_extended_community_ids: List of IP Extended Community resource IDs. + :vartype ip_extended_community_ids: list[str] + """ + + ip_extended_community_ids: Optional[list[str]] = rest_field( + name="ipExtendedCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community resource IDs.""" + + @overload + def __init__( + self, + *, + ip_extended_community_ids: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpExtendedCommunityPatch(TagsUpdate): + """The IP Extended Communities patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: IP Extended Community patchable properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatchProperties + """ + + properties: Optional["_models.IpExtendedCommunityPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Extended Community patchable properties.""" + + __flattened_items = ["annotation", "ip_extended_community_rules"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.IpExtendedCommunityPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpExtendedCommunityPatchProperties(_Model): + """IP Extended Community patchable properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar ip_extended_community_rules: List of IP Extended Community Rules. + :vartype ip_extended_community_rules: + list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + ip_extended_community_rules: Optional[list["_models.IpExtendedCommunityRule"]] = rest_field( + name="ipExtendedCommunityRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community Rules.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + ip_extended_community_rules: Optional[list["_models.IpExtendedCommunityRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpExtendedCommunityProperties(_Model): + """IP Extended Community Properties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. + :vartype ip_extended_community_rules: + list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] + :ivar network_fabric_id: ARM Resource ID of the Network Fabric. + :vartype network_fabric_id: str + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + ip_extended_community_rules: list["_models.IpExtendedCommunityRule"] = rest_field( + name="ipExtendedCommunityRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community Rules. Required.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """ARM Resource ID of the Network Fabric.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpExtendedCommunityRule(_Model): + """List of IP Extended Community Rules. + + :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known + values are: "Permit" and "Deny". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are + evaluated starting with the lowest sequence number and continue down the list until a match is + made. Once a match is made, the permit or deny statement is applied to that network and the + rest of the list is ignored. Required. + :vartype sequence_number: int + :ivar route_targets: Route Target List.The expected formats are ASN(plain):NN >> example + 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example + 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in + range of 0-4294967295. Required. + :vartype route_targets: list[str] + """ + + action: Union[str, "_models.CommunityActionTypes"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: + \"Permit\" and \"Deny\".""" + sequence_number: int = rest_field(name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"]) + """Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the + lowest sequence number and continue down the list until a match is made. Once a match is made, + the permit or deny statement is applied to that network and the rest of the list is ignored. + Required.""" + route_targets: list[str] = rest_field( + name="routeTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN + >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of + ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. Required.""" + + @overload + def __init__( + self, + *, + action: Union[str, "_models.CommunityActionTypes"], + sequence_number: int, + route_targets: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpGroupPatchProperties(_Model): + """IP Group properties. + + :ivar name: IP Group name. + :vartype name: str + :ivar ip_address_type: IP Address type. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar ip_prefixes: List of IP Prefixes. + :vartype ip_prefixes: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP Group name.""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address type. Known values are: \"IPv4\" and \"IPv6\".""" + ip_prefixes: Optional[list[str]] = rest_field( + name="ipPrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Prefixes.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + ip_prefixes: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpGroupProperties(_Model): + """IP Group properties. + + :ivar name: IP Group name. + :vartype name: str + :ivar ip_address_type: IP Address type. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar ip_prefixes: List of IP Prefixes. + :vartype ip_prefixes: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP Group name.""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address type. Known values are: \"IPv4\" and \"IPv6\".""" + ip_prefixes: Optional[list[str]] = rest_field( + name="ipPrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Prefixes.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + ip_prefixes: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpMatchCondition(_Model): + """Defines the condition that can be filtered using the selected IPs. + + :ivar type: IP Address type that needs to be matched. Known values are: "SourceIP", + "DestinationIP", and "Bidirectional". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType + :ivar prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and + "LongestPrefix". + :vartype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType + :ivar ip_prefix_values: The list of IP Prefixes that need to be matched. + :vartype ip_prefix_values: list[str] + :ivar ip_group_names: The List of IP Group Names that need to be matched. + :vartype ip_group_names: list[str] + """ + + type: Optional[Union[str, "_models.SourceDestinationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address type that needs to be matched. Known values are: \"SourceIP\", \"DestinationIP\", + and \"Bidirectional\".""" + prefix_type: Optional[Union[str, "_models.PrefixType"]] = rest_field( + name="prefixType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Prefix Type that needs to be matched. Known values are: \"Prefix\" and \"LongestPrefix\".""" + ip_prefix_values: Optional[list[str]] = rest_field( + name="ipPrefixValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of IP Prefixes that need to be matched.""" + ip_group_names: Optional[list[str]] = rest_field( + name="ipGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The List of IP Group Names that need to be matched.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.SourceDestinationType"]] = None, + prefix_type: Optional[Union[str, "_models.PrefixType"]] = None, + ip_prefix_values: Optional[list[str]] = None, + ip_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpMatchConditionPatch(_Model): + """Defines the condition that can be filtered using the selected IPs. + + :ivar type: IP Address type that needs to be matched. Known values are: "SourceIP", + "DestinationIP", and "Bidirectional". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType + :ivar prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and + "LongestPrefix". + :vartype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType + :ivar ip_prefix_values: The list of IP Prefixes that need to be matched. + :vartype ip_prefix_values: list[str] + :ivar ip_group_names: The List of IP Group Names that need to be matched. + :vartype ip_group_names: list[str] + """ + + type: Optional[Union[str, "_models.SourceDestinationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Address type that needs to be matched. Known values are: \"SourceIP\", \"DestinationIP\", + and \"Bidirectional\".""" + prefix_type: Optional[Union[str, "_models.PrefixType"]] = rest_field( + name="prefixType", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Prefix Type that needs to be matched. Known values are: \"Prefix\" and \"LongestPrefix\".""" + ip_prefix_values: Optional[list[str]] = rest_field( + name="ipPrefixValues", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of IP Prefixes that need to be matched.""" + ip_group_names: Optional[list[str]] = rest_field( + name="ipGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The List of IP Group Names that need to be matched.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.SourceDestinationType"]] = None, + prefix_type: Optional[Union[str, "_models.PrefixType"]] = None, + ip_prefix_values: Optional[list[str]] = None, + ip_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpPrefix(TrackedResource): + """The IP Prefix resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The IP Prefix properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpPrefixProperties + """ + + properties: "_models.IpPrefixProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The IP Prefix properties. Required.""" + + __flattened_items = [ + "annotation", + "network_fabric_id", + "ip_prefix_rules", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.IpPrefixProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpPrefixPatch(TagsUpdate): + """The IP Prefix patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: IP Prefix patchable properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatchProperties + """ + + properties: Optional["_models.IpPrefixPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Prefix patchable properties.""" + + __flattened_items = ["annotation", "ip_prefix_rules"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.IpPrefixPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IpPrefixPatchProperties(_Model): + """IP Prefix patchable properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar ip_prefix_rules: The list of IP Prefix Rules. + :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = rest_field( + name="ipPrefixRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of IP Prefix Rules.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpPrefixProperties(_Model): + """IP Prefix Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_fabric_id: ARM Resource ID of the Network Fabric. + :vartype network_fabric_id: str + :ivar ip_prefix_rules: The list of IP Prefix Rules. Required. + :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """ARM Resource ID of the Network Fabric.""" + ip_prefix_rules: list["_models.IpPrefixRule"] = rest_field( + name="ipPrefixRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of IP Prefix Rules. Required.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + ip_prefix_rules: list["_models.IpPrefixRule"], + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpPrefixRule(_Model): + """IP Prefix Rule properties. + + :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known + values are: "Permit" and "Deny". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are + evaluated starting with the lowest sequence number and continue down the list until a match is + made. Once a match is made, the permit or deny statement is applied to that network and the + rest of the list is ignored. Required. + :vartype sequence_number: int + :ivar network_prefix: Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. + Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. Required. + :vartype network_prefix: str + :ivar condition: Specify prefix-list bounds. Known values are: "EqualTo", + "GreaterThanOrEqualTo", "LesserThanOrEqualTo", and "Range". + :vartype condition: str or ~azure.mgmt.managednetworkfabric.models.Condition + :ivar subnet_mask_length: SubnetMaskLength gives the minimum NetworkPrefix length to be + matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. + :vartype subnet_mask_length: str + """ + + action: Union[str, "_models.CommunityActionTypes"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action to be taken on the configuration. Example: Permit | Deny. Required. Known values are: + \"Permit\" and \"Deny\".""" + sequence_number: int = rest_field(name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"]) + """Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the + lowest sequence number and continue down the list until a match is made. Once a match is made, + the permit or deny statement is applied to that network and the rest of the list is ignored. + Required.""" + network_prefix: str = rest_field(name="networkPrefix", visibility=["read", "create", "update", "delete", "query"]) + """Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | + 3FFE:FFFF:0:CD30::/126. Required.""" + condition: Optional[Union[str, "_models.Condition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specify prefix-list bounds. Known values are: \"EqualTo\", \"GreaterThanOrEqualTo\", + \"LesserThanOrEqualTo\", and \"Range\".""" + subnet_mask_length: Optional[str] = rest_field( + name="subnetMaskLength", visibility=["read", "create", "update", "delete", "query"] + ) + """SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 + are 1 - 32 . Possible values of IPv6 are 1 - 128.""" + + @overload + def __init__( + self, + *, + action: Union[str, "_models.CommunityActionTypes"], + sequence_number: int, + network_prefix: str, + condition: Optional[Union[str, "_models.Condition"]] = None, + subnet_mask_length: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IsolationDomainPatchProperties(_Model): + """Isolation Domain Properties. + + :ivar encapsulation: Type of encapsulation. Known values are: "None" and "GRE". + :vartype encapsulation: str or ~azure.mgmt.managednetworkfabric.models.Encapsulation + :ivar neighbor_group_ids: List of Neighbor Group IDs. + :vartype neighbor_group_ids: list[str] + """ + + encapsulation: Optional[Union[str, "_models.Encapsulation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of encapsulation. Known values are: \"None\" and \"GRE\".""" + neighbor_group_ids: Optional[list[str]] = rest_field( + name="neighborGroupIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Neighbor Group IDs.""" + + @overload + def __init__( + self, + *, + encapsulation: Optional[Union[str, "_models.Encapsulation"]] = None, + neighbor_group_ids: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IsolationDomainProperties(_Model): + """Isolation Domain Properties. + + :ivar encapsulation: Type of encapsulation. Known values are: "None" and "GRE". + :vartype encapsulation: str or ~azure.mgmt.managednetworkfabric.models.Encapsulation + :ivar neighbor_group_ids: List of Neighbor Group IDs. + :vartype neighbor_group_ids: list[str] + """ + + encapsulation: Optional[Union[str, "_models.Encapsulation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of encapsulation. Known values are: \"None\" and \"GRE\".""" + neighbor_group_ids: Optional[list[str]] = rest_field( + name="neighborGroupIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Neighbor Group IDs.""" + + @overload + def __init__( + self, + *, + encapsulation: Optional[Union[str, "_models.Encapsulation"]] = None, + neighbor_group_ids: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L2IsolationDomain(TrackedResource): + """The L2 Isolation Domain resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The L2IsolationDomain properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.L2IsolationDomainProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The L2IsolationDomain properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "network_fabric_id", + "vlan_id", + "mtu", + "extended_vlan", + "network_to_network_interconnect_id", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.L2IsolationDomainProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class L2IsolationDomainPatch(TagsUpdate): + """The L2 Isolation Domain patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: L2 Isolation Domain resource patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.L2IsolationDomainPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """L2 Isolation Domain resource patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "mtu", "extended_vlan", "network_to_network_interconnect_id"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.L2IsolationDomainPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class L2IsolationDomainPatchProperties(AnnotationResource): + """L2 Isolation Domain Patch Properties defines the patchable properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar mtu: Maximum transmission unit. Default value is 1500. + :vartype mtu: int + :ivar extended_vlan: Extended VLAN status. Known values are: "Enabled" and "Disabled". + :vartype extended_vlan: str or ~azure.mgmt.managednetworkfabric.models.ExtendedVlan + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the L2 ISD resource. + :vartype network_to_network_interconnect_id: str + """ + + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum transmission unit. Default value is 1500.""" + extended_vlan: Optional[Union[str, "_models.ExtendedVlan"]] = rest_field( + name="extendedVlan", visibility=["read", "create", "update", "delete", "query"] + ) + """Extended VLAN status. Known values are: \"Enabled\" and \"Disabled\".""" + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + mtu: Optional[int] = None, + extended_vlan: Optional[Union[str, "_models.ExtendedVlan"]] = None, + network_to_network_interconnect_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L2IsolationDomainProperties(AnnotationResource): + """L2Isolation Domain Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. + :vartype network_fabric_id: str + :ivar vlan_id: Vlan Identifier of the Network Fabric. Example: 501. Required. + :vartype vlan_id: int + :ivar mtu: Maximum transmission unit. Default value is 1500. + :vartype mtu: int + :ivar extended_vlan: Extended VLAN status, default value is Disabled. Known values are: + "Enabled" and "Disabled". + :vartype extended_vlan: str or ~azure.mgmt.managednetworkfabric.models.ExtendedVlan + :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId + of the L2 ISD resource. + :vartype network_to_network_interconnect_id: str + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + network_fabric_id: str = rest_field( + name="networkFabricId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Network Fabric. Required.""" + vlan_id: int = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan Identifier of the Network Fabric. Example: 501. Required.""" + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum transmission unit. Default value is 1500.""" + extended_vlan: Optional[Union[str, "_models.ExtendedVlan"]] = rest_field( + name="extendedVlan", visibility=["read", "create", "update", "delete", "query"] + ) + """Extended VLAN status, default value is Disabled. Known values are: \"Enabled\" and + \"Disabled\".""" + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the networkToNetworkInterconnectId of the L2 ISD resource.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + network_fabric_id: str, + vlan_id: int, + annotation: Optional[str] = None, + mtu: Optional[int] = None, + extended_vlan: Optional[Union[str, "_models.ExtendedVlan"]] = None, + network_to_network_interconnect_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3ExportRoutePolicy(_Model): + """Array of ARM Resource ID of the RoutePolicies. + + :ivar export_ipv4_route_policy_id: ARM Resource ID of the RoutePolicy. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: ARM Resource ID of the RoutePolicy. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the RoutePolicy.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the RoutePolicy.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3ExportRoutePolicyPatch(_Model): + """Array of ARM Resource ID of the RoutePolicies. + + :ivar export_ipv4_route_policy_id: ARM Resource ID of the RoutePolicy. + :vartype export_ipv4_route_policy_id: str + :ivar export_ipv6_route_policy_id: ARM Resource ID of the RoutePolicy. + :vartype export_ipv6_route_policy_id: str + """ + + export_ipv4_route_policy_id: Optional[str] = rest_field( + name="exportIpv4RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the RoutePolicy.""" + export_ipv6_route_policy_id: Optional[str] = rest_field( + name="exportIpv6RoutePolicyId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the RoutePolicy.""" + + @overload + def __init__( + self, + *, + export_ipv4_route_policy_id: Optional[str] = None, + export_ipv6_route_policy_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3IsolationDomain(TrackedResource): + """The L3 Isolation Domain resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The L3 Isolation Domain Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.L3IsolationDomainProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The L3 Isolation Domain Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "redistribute_connected_subnets", + "redistribute_static_routes", + "aggregate_route_configuration", + "connected_subnet_route_policy", + "network_fabric_id", + "static_route_policy", + "unique_rd_configuration", + "v4_route_prefix_limit", + "v6_route_prefix_limit", + "last_operation", + "export_policy_configuration", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.L3IsolationDomainProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class L3IsolationDomainPatch(TagsUpdate): + """The L3 Isolation Domain patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: L3 Isolation Domain resource patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.L3IsolationDomainPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """L3 Isolation Domain resource patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "redistribute_connected_subnets", + "redistribute_static_routes", + "aggregate_route_configuration", + "connected_subnet_route_policy", + "static_route_policy", + "v4_route_prefix_limit", + "v6_route_prefix_limit", + "export_policy_configuration", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.L3IsolationDomainPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class L3IsolationDomainPatchProperties(_Model): + """Resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known + values are: "True" and "False". + :vartype redistribute_connected_subnets: str or + ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets + :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values + are: "True" and "False". + :vartype redistribute_static_routes: str or + ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes + :ivar aggregate_route_configuration: Aggregate route configurations. + :vartype aggregate_route_configuration: + ~azure.mgmt.managednetworkfabric.models.AggregateRoutePatchConfiguration + :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. + :vartype connected_subnet_route_policy: + ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicyPatch + :ivar static_route_policy: Static Route - route policy. + :vartype static_route_policy: ~azure.mgmt.managednetworkfabric.models.StaticRoutePolicyPatch + :ivar v4_route_prefix_limit: IPv4 VRF Limit configuration. + :vartype v4_route_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.RoutePrefixLimitPatchProperties + :ivar v6_route_prefix_limit: IPv6 VRF Limit configuration. + :vartype v6_route_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.RoutePrefixLimitPatchProperties + :ivar export_policy_configuration: BMP Export Policy configuration. + :vartype export_policy_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpExportPolicyPatchProperties + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + redistribute_connected_subnets: Optional[Union[str, "_models.RedistributeConnectedSubnets"]] = rest_field( + name="redistributeConnectedSubnets", visibility=["read", "create", "update", "delete", "query"] + ) + """Advertise Connected Subnets. Ex: \"True\" | \"False\". Known values are: \"True\" and + \"False\".""" + redistribute_static_routes: Optional[Union[str, "_models.RedistributeStaticRoutes"]] = rest_field( + name="redistributeStaticRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Advertise Static Routes. Ex: \"True\" | \"False\". Known values are: \"True\" and \"False\".""" + aggregate_route_configuration: Optional["_models.AggregateRoutePatchConfiguration"] = rest_field( + name="aggregateRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Aggregate route configurations.""" + connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicyPatch"] = rest_field( + name="connectedSubnetRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Connected Subnet RoutePolicy.""" + static_route_policy: Optional["_models.StaticRoutePolicyPatch"] = rest_field( + name="staticRouteRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route - route policy.""" + v4_route_prefix_limit: Optional["_models.RoutePrefixLimitPatchProperties"] = rest_field( + name="v4routePrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 VRF Limit configuration.""" + v6_route_prefix_limit: Optional["_models.RoutePrefixLimitPatchProperties"] = rest_field( + name="v6routePrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 VRF Limit configuration.""" + export_policy_configuration: Optional["_models.BmpExportPolicyPatchProperties"] = rest_field( + name="exportPolicyConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Export Policy configuration.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + redistribute_connected_subnets: Optional[Union[str, "_models.RedistributeConnectedSubnets"]] = None, + redistribute_static_routes: Optional[Union[str, "_models.RedistributeStaticRoutes"]] = None, + aggregate_route_configuration: Optional["_models.AggregateRoutePatchConfiguration"] = None, + connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicyPatch"] = None, + static_route_policy: Optional["_models.StaticRoutePolicyPatch"] = None, + v4_route_prefix_limit: Optional["_models.RoutePrefixLimitPatchProperties"] = None, + v6_route_prefix_limit: Optional["_models.RoutePrefixLimitPatchProperties"] = None, + export_policy_configuration: Optional["_models.BmpExportPolicyPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3IsolationDomainProperties(_Model): + """L3 Isolation Domain Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known + values are: "True" and "False". + :vartype redistribute_connected_subnets: str or + ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets + :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values + are: "True" and "False". + :vartype redistribute_static_routes: str or + ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes + :ivar aggregate_route_configuration: Aggregate route configurations. + :vartype aggregate_route_configuration: + ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration + :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. + :vartype connected_subnet_route_policy: + ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy + :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. + :vartype network_fabric_id: str + :ivar static_route_policy: Static Route - route policy. + :vartype static_route_policy: ~azure.mgmt.managednetworkfabric.models.StaticRoutePolicy + :ivar unique_rd_configuration: Unique Route Distinguisher configuration. + :vartype unique_rd_configuration: + ~azure.mgmt.managednetworkfabric.models.L3UniqueRouteDistinguisherProperties + :ivar v4_route_prefix_limit: IPv4 VRF Limit configuration. + :vartype v4_route_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.RoutePrefixLimitProperties + :ivar v6_route_prefix_limit: IPv6 VRF Limit configuration. + :vartype v6_route_prefix_limit: + ~azure.mgmt.managednetworkfabric.models.RoutePrefixLimitProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar export_policy_configuration: BMP Export Policy configuration. + :vartype export_policy_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpExportPolicyProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + redistribute_connected_subnets: Optional[Union[str, "_models.RedistributeConnectedSubnets"]] = rest_field( + name="redistributeConnectedSubnets", visibility=["read", "create", "update", "delete", "query"] + ) + """Advertise Connected Subnets. Ex: \"True\" | \"False\". Known values are: \"True\" and + \"False\".""" + redistribute_static_routes: Optional[Union[str, "_models.RedistributeStaticRoutes"]] = rest_field( + name="redistributeStaticRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Advertise Static Routes. Ex: \"True\" | \"False\". Known values are: \"True\" and \"False\".""" + aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = rest_field( + name="aggregateRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Aggregate route configurations.""" + connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = rest_field( + name="connectedSubnetRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Connected Subnet RoutePolicy.""" + network_fabric_id: str = rest_field(name="networkFabricId", visibility=["read", "create"]) + """ARM Resource ID of the Network Fabric. Required.""" + static_route_policy: Optional["_models.StaticRoutePolicy"] = rest_field( + name="staticRouteRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route - route policy.""" + unique_rd_configuration: Optional["_models.L3UniqueRouteDistinguisherProperties"] = rest_field( + name="uniqueRdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique Route Distinguisher configuration.""" + v4_route_prefix_limit: Optional["_models.RoutePrefixLimitProperties"] = rest_field( + name="v4routePrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 VRF Limit configuration.""" + v6_route_prefix_limit: Optional["_models.RoutePrefixLimitProperties"] = rest_field( + name="v6routePrefixLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 VRF Limit configuration.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = rest_field( + name="exportPolicyConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Export Policy configuration.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + network_fabric_id: str, + annotation: Optional[str] = None, + redistribute_connected_subnets: Optional[Union[str, "_models.RedistributeConnectedSubnets"]] = None, + redistribute_static_routes: Optional[Union[str, "_models.RedistributeStaticRoutes"]] = None, + aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, + connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, + static_route_policy: Optional["_models.StaticRoutePolicy"] = None, + unique_rd_configuration: Optional["_models.L3UniqueRouteDistinguisherProperties"] = None, + v4_route_prefix_limit: Optional["_models.RoutePrefixLimitProperties"] = None, + v6_route_prefix_limit: Optional["_models.RoutePrefixLimitProperties"] = None, + export_policy_configuration: Optional["_models.BmpExportPolicyProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3OptionBPatchProperties(_Model): + """Option B configuration. + + :ivar import_route_targets: RouteTargets to be applied. This is used for the backward + compatibility. + :vartype import_route_targets: list[str] + :ivar export_route_targets: RouteTargets to be applied. This is used for the backward + compatibility. + :vartype export_route_targets: list[str] + :ivar route_targets: RouteTargets to be applied. + :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetPatchInformation + """ + + import_route_targets: Optional[list[str]] = rest_field( + name="importRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied. This is used for the backward compatibility.""" + export_route_targets: Optional[list[str]] = rest_field( + name="exportRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied. This is used for the backward compatibility.""" + route_targets: Optional["_models.RouteTargetPatchInformation"] = rest_field( + name="routeTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied.""" + + @overload + def __init__( + self, + *, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, + route_targets: Optional["_models.RouteTargetPatchInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3OptionBProperties(_Model): + """Option B configuration. + + :ivar import_route_targets: RouteTargets to be applied. This is used for the backward + compatibility. + :vartype import_route_targets: list[str] + :ivar export_route_targets: RouteTargets to be applied. This is used for the backward + compatibility. + :vartype export_route_targets: list[str] + :ivar route_targets: RouteTargets to be applied. + :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation + """ + + import_route_targets: Optional[list[str]] = rest_field( + name="importRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied. This is used for the backward compatibility.""" + export_route_targets: Optional[list[str]] = rest_field( + name="exportRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied. This is used for the backward compatibility.""" + route_targets: Optional["_models.RouteTargetInformation"] = rest_field( + name="routeTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """RouteTargets to be applied.""" + + @overload + def __init__( + self, + *, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, + route_targets: Optional["_models.RouteTargetInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class L3UniqueRouteDistinguisherProperties(_Model): + """Unique Route Distinguisher properties. + + :ivar unique_rds: List of Unique Route Distinguisher addresses. + :vartype unique_rds: list[str] + """ + + unique_rds: Optional[list[str]] = rest_field(name="uniqueRds", visibility=["read"]) + """List of Unique Route Distinguisher addresses.""" + + +class LastOperationProperties(_Model): + """Details of the last operations performed on the resource. + + :ivar details: Details status of the last operation performed on the resource. + :vartype details: str + """ + + details: Optional[str] = rest_field(visibility=["read"]) + """Details status of the last operation performed on the resource.""" + + +class Layer2Configuration(_Model): + """Common properties for Layer2 Configuration. + + :ivar mtu: MTU of the packets between PE & CE. + :vartype mtu: int + :ivar interfaces: List of network device interfaces resource IDs. + :vartype interfaces: list[str] + """ + + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU of the packets between PE & CE.""" + interfaces: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of network device interfaces resource IDs.""" + + @overload + def __init__( + self, + *, + mtu: Optional[int] = None, + interfaces: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Layer2ConfigurationPatch(_Model): + """Common properties for Layer2 Configuration. + + :ivar mtu: MTU of the packets between PE & CE. + :vartype mtu: int + :ivar interfaces: List of network device interfaces resource IDs. + :vartype interfaces: list[str] + """ + + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU of the packets between PE & CE.""" + interfaces: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of network device interfaces resource IDs.""" + + @overload + def __init__( + self, + *, + mtu: Optional[int] = None, + interfaces: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Layer3IpPrefixPatchProperties(_Model): + """Layer 3 primary and secondary IP Address prefixes. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + """ + + primary_ipv4_prefix: Optional[str] = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: Optional[str] = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + + @overload + def __init__( + self, + *, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Layer3IpPrefixProperties(_Model): + """Layer 3 primary and secondary IP Address prefixes. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + """ + + primary_ipv4_prefix: Optional[str] = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: Optional[str] = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + + @overload + def __init__( + self, + *, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedResourceGroupConfiguration(_Model): + """Managed Resource Group configuration properties. + + :ivar name: The NFC service will be hosted in a Managed resource group. + :vartype name: str + :ivar location: Managed resource group location. + :vartype location: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The NFC service will be hosted in a Managed resource group.""" + location: Optional[str] = rest_field(visibility=["read", "create"]) + """Managed resource group location.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + location: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedServiceIdentity(_Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of managed identity assigned to this resource. Required. Known values are: + "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.managednetworkfabric.models.UserAssignedIdentity] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The service principal ID of the system assigned identity. This property will only be provided + for a system assigned identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant ID of the system assigned identity. This property will only be provided for a system + assigned identity.""" + type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Required. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The identities assigned to this resource by the user.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ManagedServiceIdentityType"], + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedServiceIdentityPatch(_Model): + """The managed service identities assigned to this resource. + + :ivar type: The type of managed identity assigned to this resource. Known values are: "None", + "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The identities assigned to this resource by the user. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.managednetworkfabric.models.UserAssignedIdentity] + """ + + type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of managed identity assigned to this resource. Known values are: \"None\", + \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The identities assigned to this resource by the user.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagementNetworkConfigurationProperties(_Model): + """Configuration to be used to setup the management network. + + :ivar infrastructure_vpn_configuration: VPN Configuration properties. Required. + :vartype infrastructure_vpn_configuration: + ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties + :ivar workload_vpn_configuration: VPN Configuration properties. Required. + :vartype workload_vpn_configuration: + ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties + """ + + infrastructure_vpn_configuration: "_models.VpnConfigurationProperties" = rest_field( + name="infrastructureVpnConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """VPN Configuration properties. Required.""" + workload_vpn_configuration: "_models.VpnConfigurationProperties" = rest_field( + name="workloadVpnConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """VPN Configuration properties. Required.""" + + @overload + def __init__( + self, + *, + infrastructure_vpn_configuration: "_models.VpnConfigurationProperties", + workload_vpn_configuration: "_models.VpnConfigurationProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagementNetworkPatchConfiguration(_Model): + """Configuration to be used to setup the management network. + + :ivar infrastructure_vpn_configuration: VPN Configuration properties. + :vartype infrastructure_vpn_configuration: + ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties + :ivar workload_vpn_configuration: VPN Configuration properties. + :vartype workload_vpn_configuration: + ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties + """ + + infrastructure_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = rest_field( + name="infrastructureVpnConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """VPN Configuration properties.""" + workload_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = rest_field( + name="workloadVpnConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """VPN Configuration properties.""" + + @overload + def __init__( + self, + *, + infrastructure_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = None, + workload_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NativeIpv4PrefixLimitPatchProperties(_Model): + """External Network native IPv4 prefix limits patch properties. + + :ivar prefix_limits: Prefix limits. + :vartype prefix_limits: + list[~azure.mgmt.managednetworkfabric.models.PrefixLimitPatchProperties] + """ + + prefix_limits: Optional[list["_models.PrefixLimitPatchProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """Prefix limits.""" + + @overload + def __init__( + self, + *, + prefix_limits: Optional[list["_models.PrefixLimitPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NativeIpv4PrefixLimitProperties(_Model): + """External Network native IPv4 prefix limit properties. + + :ivar prefix_limits: Prefix limits. + :vartype prefix_limits: list[~azure.mgmt.managednetworkfabric.models.PrefixLimitProperties] + """ + + prefix_limits: Optional[list["_models.PrefixLimitProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """Prefix limits.""" + + @overload + def __init__( + self, + *, + prefix_limits: Optional[list["_models.PrefixLimitProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NativeIpv6PrefixLimitPatchProperties(_Model): + """External Network native IPv6 prefix limits patch properties. + + :ivar prefix_limits: Prefix limits. + :vartype prefix_limits: + list[~azure.mgmt.managednetworkfabric.models.PrefixLimitPatchProperties] + """ + + prefix_limits: Optional[list["_models.PrefixLimitPatchProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """Prefix limits.""" + + @overload + def __init__( + self, + *, + prefix_limits: Optional[list["_models.PrefixLimitPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NativeIpv6PrefixLimitProperties(_Model): + """External Network native IPv6 prefix limit properties. + + :ivar prefix_limits: Prefix limits. + :vartype prefix_limits: list[~azure.mgmt.managednetworkfabric.models.PrefixLimitProperties] + """ + + prefix_limits: Optional[list["_models.PrefixLimitProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """Prefix limits.""" + + @overload + def __init__( + self, + *, + prefix_limits: Optional[list["_models.PrefixLimitProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborAddress(_Model): + """Neighbor Address properties. + + :ivar address: IP Address. + :vartype address: str + :ivar bfd_administrative_state: BFD Administrative State for each Neighbor Address. Example: + Enabled | Disabled. Known values are: "Enabled", "Disabled", "MAT", and "RMA". + :vartype bfd_administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + :ivar bgp_administrative_state: BGP Administrative State for each Neighbor Address. Example: + Enabled | Disabled. Known values are: "Enabled" and "Disabled". + :vartype bgp_administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BgpAdministrativeState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + address: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP Address.""" + bfd_administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="bfdAdministrativeState", visibility=["read"] + ) + """BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. Known values + are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + bgp_administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = rest_field( + name="bgpAdministrativeState", visibility=["read"] + ) + """BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. Known values + are: \"Enabled\" and \"Disabled\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + address: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborAddressBfdAdministrativeStatus(_Model): + """Neighbor Address Bidirectional Forwarding Detection (BFD) Administrative Status. + + :ivar neighbor_address: NeighborAddress - Input should be either All or Specific Ipv4 Address + or Specific Ipv6 Address. + :vartype neighbor_address: str + :ivar administrative_state: BFD Administrative state. Known values are: "Enabled", "Disabled", + "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + :ivar error: Error message. + :vartype error: str + """ + + neighbor_address: Optional[str] = rest_field( + name="neighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address.""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Administrative state. Known values are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error message.""" + + @overload + def __init__( + self, + *, + neighbor_address: Optional[str] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + error: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborAddressBgpAdministrativeStatus(_Model): + """Neighbor Address BGP Administrative Status. + + :ivar neighbor_address: NeighborAddress - Input should be either All or Specific Ipv4 Address + or Specific Ipv6 Address. + :vartype neighbor_address: str + :ivar administrative_state: BGP Administrative state. Known values are: "Enabled" and + "Disabled". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BgpAdministrativeState + :ivar error: Error message. + :vartype error: str + """ + + neighbor_address: Optional[str] = rest_field( + name="neighborAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """NeighborAddress - Input should be either All or Specific Ipv4 Address or Specific Ipv6 Address.""" + administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Administrative state. Known values are: \"Enabled\" and \"Disabled\".""" + error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error message.""" + + @overload + def __init__( + self, + *, + neighbor_address: Optional[str] = None, + administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = None, + error: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborAddressPatch(_Model): + """Neighbor Address properties. + + :ivar address: IP Address. + :vartype address: str + :ivar bfd_administrative_state: BFD Administrative State for each Neighbor Address. Example: + Enabled | Disabled. Known values are: "Enabled", "Disabled", "MAT", and "RMA". + :vartype bfd_administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + :ivar bgp_administrative_state: BGP Administrative State for each Neighbor Address. Example: + Enabled | Disabled. Known values are: "Enabled" and "Disabled". + :vartype bgp_administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BgpAdministrativeState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + address: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP Address.""" + bfd_administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="bfdAdministrativeState", visibility=["read"] + ) + """BFD Administrative State for each Neighbor Address. Example: Enabled | Disabled. Known values + are: \"Enabled\", \"Disabled\", \"MAT\", and \"RMA\".""" + bgp_administrative_state: Optional[Union[str, "_models.BgpAdministrativeState"]] = rest_field( + name="bgpAdministrativeState", visibility=["read"] + ) + """BGP Administrative State for each Neighbor Address. Example: Enabled | Disabled. Known values + are: \"Enabled\" and \"Disabled\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + address: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborGroup(TrackedResource): + """Defines the Neighbor Group. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NeighborGroup Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NeighborGroupProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NeighborGroupProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NeighborGroup Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "destination", + "network_tap_ids", + "network_tap_rule_ids", + "network_fabric_ids", + "last_operation", + "provisioning_state", + "configuration_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NeighborGroupProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NeighborGroupDestination(_Model): + """An array of destination IPv4 Addresses or IPv6 Addresses. + + :ivar ipv4_addresses: Array of IPv4 Addresses. + :vartype ipv4_addresses: list[str] + :ivar ipv6_addresses: Array of IPv6 Addresses. + :vartype ipv6_addresses: list[str] + """ + + ipv4_addresses: Optional[list[str]] = rest_field( + name="ipv4Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of IPv4 Addresses.""" + ipv6_addresses: Optional[list[str]] = rest_field( + name="ipv6Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of IPv6 Addresses.""" + + @overload + def __init__( + self, + *, + ipv4_addresses: Optional[list[str]] = None, + ipv6_addresses: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborGroupDestinationPatch(_Model): + """An array of destination IPv4 Addresses or IPv6 Addresses. + + :ivar ipv4_addresses: Array of IPv4 Addresses. + :vartype ipv4_addresses: list[str] + :ivar ipv6_addresses: Array of IPv6 Addresses. + :vartype ipv6_addresses: list[str] + """ + + ipv4_addresses: Optional[list[str]] = rest_field( + name="ipv4Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of IPv4 Addresses.""" + ipv6_addresses: Optional[list[str]] = rest_field( + name="ipv6Addresses", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of IPv6 Addresses.""" + + @overload + def __init__( + self, + *, + ipv4_addresses: Optional[list[str]] = None, + ipv6_addresses: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborGroupPatch(TagsUpdate): + """The Neighbor Group Patch definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Neighbor Group Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NeighborGroupPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Neighbor Group Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "destination"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NeighborGroupPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NeighborGroupPatchProperties(_Model): + """Neighbor Group Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. + :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestinationPatch + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + destination: Optional["_models.NeighborGroupDestinationPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """An array of destination IPv4 Addresses or IPv6 Addresses.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + destination: Optional["_models.NeighborGroupDestinationPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborGroupProperties(_Model): + """Neighbor Group Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. Required. + :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination + :ivar network_tap_ids: List of NetworkTap IDs where neighbor group is associated. + :vartype network_tap_ids: list[str] + :ivar network_tap_rule_ids: List of Network Tap Rule IDs where neighbor group is associated. + :vartype network_tap_rule_ids: list[str] + :ivar network_fabric_ids: Associated Network Fabric Resource IDs. + :vartype network_fabric_ids: list[str] + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: The provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + destination: "_models.NeighborGroupDestination" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """An array of destination IPv4 Addresses or IPv6 Addresses. Required.""" + network_tap_ids: Optional[list[str]] = rest_field(name="networkTapIds", visibility=["read"]) + """List of NetworkTap IDs where neighbor group is associated.""" + network_tap_rule_ids: Optional[list[str]] = rest_field(name="networkTapRuleIds", visibility=["read"]) + """List of Network Tap Rule IDs where neighbor group is associated.""" + network_fabric_ids: Optional[list[str]] = rest_field(name="networkFabricIds", visibility=["read"]) + """Associated Network Fabric Resource IDs.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + destination: "_models.NeighborGroupDestination", + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NeighborGroupResyncResponse(_Model): + """Response for Neighbor Group Resync operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDevice(TrackedResource): + """The Network Bootstrap Device resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkBootstrapDevice properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkBootstrapDeviceProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkBootstrapDevice properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "host_name", + "serial_number", + "version", + "network_device_sku", + "network_fabric_id", + "secondary_management_ipv4_address", + "dhcp_v4_server_ip_address", + "primary_management_ipv6_address", + "secondary_management_ipv6_address", + "provisioning_state", + "primary_management_ipv4_address", + "administrative_state", + "configuration_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkBootstrapDeviceProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkBootstrapDevicePatch(TagsUpdate): + """The Network Bootstrap Device Patch Parameters defines the patch parameters of the resource. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Bootstrap Device Patch properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkBootstrapDevicePatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Bootstrap Device Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "host_name", "serial_number"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkBootstrapDevicePatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkBootstrapDevicePatchProperties(_Model): + """Network Bootstrap Device Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar host_name: The host name of the device. + :vartype host_name: str + :ivar serial_number: Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. + :vartype serial_number: str + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the device.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + host_name: Optional[str] = None, + serial_number: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceProperties(_Model): + """Network Bootstrap Device Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar host_name: The host name of the device. + :vartype host_name: str + :ivar serial_number: Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. + :vartype serial_number: str + :ivar version: Current version of the device as defined in SKU. + :vartype version: str + :ivar network_device_sku: Network Bootstrap Device SKU name. + :vartype network_device_sku: str + :ivar network_fabric_id: Associated Network Fabric Resource ID. + :vartype network_fabric_id: str + :ivar secondary_management_ipv4_address: Secondary Management IPv4 Address. + :vartype secondary_management_ipv4_address: str + :ivar dhcp_v4_server_ip_address: Dhcp server IPv4 Address. + :vartype dhcp_v4_server_ip_address: str + :ivar primary_management_ipv6_address: Primary Management IPv6 Address. + :vartype primary_management_ipv6_address: str + :ivar secondary_management_ipv6_address: Secondary Management IPv6 Address. + :vartype secondary_management_ipv6_address: str + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar primary_management_ipv4_address: Primary Management IPv4 Address. + :vartype primary_management_ipv4_address: str + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the device.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Current version of the device as defined in SKU.""" + network_device_sku: Optional[str] = rest_field(name="networkDeviceSku", visibility=["read", "create"]) + """Network Bootstrap Device SKU name.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """Associated Network Fabric Resource ID.""" + secondary_management_ipv4_address: Optional[str] = rest_field( + name="secondaryManagementIpv4Address", visibility=["read"] + ) + """Secondary Management IPv4 Address.""" + dhcp_v4_server_ip_address: Optional[str] = rest_field(name="dhcpV4ServerIpAddress", visibility=["read"]) + """Dhcp server IPv4 Address.""" + primary_management_ipv6_address: Optional[str] = rest_field( + name="primaryManagementIpv6Address", visibility=["read"] + ) + """Primary Management IPv6 Address.""" + secondary_management_ipv6_address: Optional[str] = rest_field( + name="secondaryManagementIpv6Address", visibility=["read"] + ) + """Secondary Management IPv6 Address.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + primary_management_ipv4_address: Optional[str] = rest_field( + name="primaryManagementIpv4Address", visibility=["read"] + ) + """Primary Management IPv4 Address.""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + host_name: Optional[str] = None, + serial_number: Optional[str] = None, + network_device_sku: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceRebootResponse(_Model): + """Network Bootstrap Device reboot Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceRefreshConfigurationResponse(_Model): # pylint: disable=name-too-long + """The current status of an refresh configuration async operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceResyncPasswordsResponse(_Model): # pylint: disable=name-too-long + """Response body for a ResyncPasswords request on a Network Bootstrap Device. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceUpdateAdministrativeStateResponse(_Model): # pylint: disable=name-too-long + """Network Bootstrap Device Administrative State Update Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapDeviceUpgradeResponse(_Model): + """Network Bootstrap Device upgrade Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapInterface(ProxyResource): + """Defines the NetworkBootstrapInterface resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The NetworkBootstrapInterface properties. Required. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfaceProperties + """ + + properties: "_models.NetworkBootstrapInterfaceProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkBootstrapInterface properties. Required.""" + + __flattened_items = [ + "annotation", + "provisioning_state", + "administrative_state", + "configuration_state", + "physical_identifier", + "connected_to", + "interface_type", + "description", + "additional_description", + "ipv4_address", + "ipv6_address", + "serial_number", + ] + + @overload + def __init__( + self, + *, + properties: "_models.NetworkBootstrapInterfaceProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkBootstrapInterfacePatch(_Model): + """The NetworkBootstrapInterfacePatch resource definition. + + :ivar properties: Network Bootstrap Interface Patch properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatchProperties + """ + + properties: Optional["_models.NetworkBootstrapInterfacePatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Bootstrap Interface Patch properties.""" + + __flattened_items = ["annotation", "serial_number", "additional_description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NetworkBootstrapInterfacePatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkBootstrapInterfacePatchProperties(AnnotationResource): + """Network Bootstrap Interface Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar serial_number: Serial number of the interface. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. + :vartype serial_number: str + :ivar additional_description: Additional description of the interface. + :vartype additional_description: str + """ + + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the interface. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber.""" + additional_description: Optional[str] = rest_field( + name="additionalDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional description of the interface.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + serial_number: Optional[str] = None, + additional_description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkBootstrapInterfaceProperties(AnnotationResource): + """Network Bootstrap Interface Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar physical_identifier: Physical identifier of the device. + :vartype physical_identifier: str + :ivar connected_to: Connected to information of the device. + :vartype connected_to: str + :ivar interface_type: Type of the interface. Known values are: "Management" and "Data". + :vartype interface_type: str or ~azure.mgmt.managednetworkfabric.models.InterfaceType + :ivar description: Description of the interface. + :vartype description: str + :ivar additional_description: Additional description of the interface. + :vartype additional_description: str + :ivar ipv4_address: IPv4Address of the interface. + :vartype ipv4_address: str + :ivar ipv6_address: IPv6Address of the interface. + :vartype ipv6_address: str + :ivar serial_number: Serial number of the interface. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. + :vartype serial_number: str + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + physical_identifier: Optional[str] = rest_field(name="physicalIdentifier", visibility=["read"]) + """Physical identifier of the device.""" + connected_to: Optional[str] = rest_field(name="connectedTo", visibility=["read"]) + """Connected to information of the device.""" + interface_type: Optional[Union[str, "_models.InterfaceType"]] = rest_field( + name="interfaceType", visibility=["read"] + ) + """Type of the interface. Known values are: \"Management\" and \"Data\".""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of the interface.""" + additional_description: Optional[str] = rest_field( + name="additionalDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional description of the interface.""" + ipv4_address: Optional[str] = rest_field(name="ipv4Address", visibility=["read"]) + """IPv4Address of the interface.""" + ipv6_address: Optional[str] = rest_field(name="ipv6Address", visibility=["read"]) + """IPv6Address of the interface.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the interface. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + additional_description: Optional[str] = None, + serial_number: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDevice(TrackedResource): + """The Network Device resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkDevice properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkDeviceProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkDevice properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "host_name", + "serial_number", + "identity_selector", + "version", + "network_device_sku", + "network_device_role", + "network_rack_id", + "management_ipv4_address", + "management_ipv6_address", + "rw_device_config", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + "secret_rotation_status", + "certificate_rotation_status", + "network_fabric_id", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkDeviceProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkDevicePatchParameters(TagsUpdate): + """The Network Device Patch Parameters defines the patch parameters of the resource. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Device Patch properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParametersProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkDevicePatchParametersProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Device Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "host_name", "serial_number", "identity_selector"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkDevicePatchParametersProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkDevicePatchParametersProperties(_Model): + """Network Device Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar host_name: The host name of the device. + :vartype host_name: str + :ivar serial_number: Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. + :vartype serial_number: str + :ivar identity_selector: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype identity_selector: ~azure.mgmt.managednetworkfabric.models.IdentitySelectorPatch + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the device.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber.""" + identity_selector: Optional["_models.IdentitySelectorPatch"] = rest_field( + name="identitySelector", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + host_name: Optional[str] = None, + serial_number: Optional[str] = None, + identity_selector: Optional["_models.IdentitySelectorPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceProperties(_Model): + """Network Device Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar host_name: The host name of the device. + :vartype host_name: str + :ivar serial_number: Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. Required. + :vartype serial_number: str + :ivar identity_selector: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype identity_selector: ~azure.mgmt.managednetworkfabric.models.IdentitySelector + :ivar version: Current version of the device as defined in SKU. + :vartype version: str + :ivar network_device_sku: Network Device SKU name. + :vartype network_device_sku: str + :ivar network_device_role: NetworkDeviceRole is the device role: Example: CE | ToR. Known + values are: "CE", "ToR", "NPB", "TS", and "Management". + :vartype network_device_role: str or ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRole + :ivar network_rack_id: Reference to network rack resource id. + :vartype network_rack_id: str + :ivar management_ipv4_address: Management IPv4 Address. + :vartype management_ipv4_address: str + :ivar management_ipv6_address: Management IPv6 Address. + :vartype management_ipv6_address: str + :ivar rw_device_config: User configured read-write configuration applied on the network + devices. + :vartype rw_device_config: str + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar secret_rotation_status: Secret rotation status for the device's secrets. + :vartype secret_rotation_status: + list[~azure.mgmt.managednetworkfabric.models.SecretRotationStatus] + :ivar certificate_rotation_status: Certificate rotation status for the device's certificates. + :vartype certificate_rotation_status: + list[~azure.mgmt.managednetworkfabric.models.CertificateRotationStatus] + :ivar network_fabric_id: Associated Network Fabric Resource ID. + :vartype network_fabric_id: str + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The host name of the device.""" + serial_number: str = rest_field(name="serialNumber", visibility=["read", "create", "update", "delete", "query"]) + """Serial number of the device. Format of serial Number - + Make;Model;HardwareRevisionId;SerialNumber. Required.""" + identity_selector: Optional["_models.IdentitySelector"] = rest_field( + name="identitySelector", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Current version of the device as defined in SKU.""" + network_device_sku: Optional[str] = rest_field(name="networkDeviceSku", visibility=["read", "create"]) + """Network Device SKU name.""" + network_device_role: Optional[Union[str, "_models.NetworkDeviceRole"]] = rest_field( + name="networkDeviceRole", visibility=["read"] + ) + """NetworkDeviceRole is the device role: Example: CE | ToR. Known values are: \"CE\", \"ToR\", + \"NPB\", \"TS\", and \"Management\".""" + network_rack_id: Optional[str] = rest_field(name="networkRackId", visibility=["read"]) + """Reference to network rack resource id.""" + management_ipv4_address: Optional[str] = rest_field(name="managementIpv4Address", visibility=["read"]) + """Management IPv4 Address.""" + management_ipv6_address: Optional[str] = rest_field(name="managementIpv6Address", visibility=["read"]) + """Management IPv6 Address.""" + rw_device_config: Optional[str] = rest_field(name="rwDeviceConfig", visibility=["read"]) + """User configured read-write configuration applied on the network devices.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + secret_rotation_status: Optional[list["_models.SecretRotationStatus"]] = rest_field( + name="secretRotationStatus", visibility=["read"] + ) + """Secret rotation status for the device's secrets.""" + certificate_rotation_status: Optional[list["_models.CertificateRotationStatus"]] = rest_field( + name="certificateRotationStatus", visibility=["read"] + ) + """Certificate rotation status for the device's certificates.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """Associated Network Fabric Resource ID.""" + + @overload + def __init__( + self, + *, + serial_number: str, + annotation: Optional[str] = None, + host_name: Optional[str] = None, + identity_selector: Optional["_models.IdentitySelector"] = None, + network_device_sku: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceRefreshConfigurationResponse(_Model): # pylint: disable=name-too-long + """The current status of an refresh configuration async operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceResyncPasswordsResponse(_Model): + """Response body for a ResyncPasswords request on a Network Device. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceRunRwCommandResponse(_Model): + """Response body for a RunRwCommand request on a Network Device. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Network Device Run Rw Command Response properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRwCommandResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.NetworkDeviceRwCommandResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Device Run Rw Command Response properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.NetworkDeviceRwCommandResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceRwCommandResponseProperties(_Model): + """Network Device Resource defines the properties of the resource. + + :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar output_url: Predefined link containing Device Rw Command output. + :vartype output_url: str + """ + + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configuration state. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + output_url: Optional[str] = rest_field(name="outputUrl", visibility=["read", "create", "update", "delete", "query"]) + """Predefined link containing Device Rw Command output.""" + + @overload + def __init__( + self, + *, + output_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceSku(ProxyResource): + """The NetworkDeviceSku resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The Network Device SKU properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSkuProperties + """ + + properties: "_models.NetworkDeviceSkuProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Network Device SKU properties. Required.""" + + __flattened_items = [ + "model", + "manufacturer", + "supported_versions", + "supported_role_types", + "interfaces", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.NetworkDeviceSkuProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkDeviceSkuProperties(_Model): + """Network Device SKU Properties defines the properties of the resource. + + :ivar model: Model of the network device. Required. + :vartype model: str + :ivar manufacturer: Manufacturer of the network device. + :vartype manufacturer: str + :ivar supported_versions: List of supported version details of network device. + :vartype supported_versions: + list[~azure.mgmt.managednetworkfabric.models.SupportedVersionProperties] + :ivar supported_role_types: Available roles for the network device. + :vartype supported_role_types: list[str or + ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName] + :ivar interfaces: List of network device interfaces. + :vartype interfaces: list[~azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties] + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + """ + + model: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Model of the network device. Required.""" + manufacturer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Manufacturer of the network device.""" + supported_versions: Optional[list["_models.SupportedVersionProperties"]] = rest_field( + name="supportedVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of supported version details of network device.""" + supported_role_types: Optional[list[Union[str, "_models.NetworkDeviceRoleName"]]] = rest_field( + name="supportedRoleTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Available roles for the network device.""" + interfaces: Optional[list["_models.DeviceInterfaceProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of network device interfaces.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + model: str, + manufacturer: Optional[str] = None, + supported_versions: Optional[list["_models.SupportedVersionProperties"]] = None, + supported_role_types: Optional[list[Union[str, "_models.NetworkDeviceRoleName"]]] = None, + interfaces: Optional[list["_models.DeviceInterfaceProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceUpdateAdministrativeStateResponse(_Model): # pylint: disable=name-too-long + """Network Device Administrative State Update Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceUpgradeRequest(_Model): + """NetworkDevice Upgrade Request Properties. + + :ivar version: Version to which the device needs to be upgraded. Required. + :vartype version: str + :ivar rw_device_config_url: URL to the file containing Read-write configuration to be applied + on the device during upgrade. + :vartype rw_device_config_url: str + """ + + version: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Version to which the device needs to be upgraded. Required.""" + rw_device_config_url: Optional[str] = rest_field( + name="rwDeviceConfigUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """URL to the file containing Read-write configuration to be applied on the device during upgrade.""" + + @overload + def __init__( + self, + *, + version: str, + rw_device_config_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkDeviceUpgradeResponse(_Model): + """Network Device Upgrade Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabric(TrackedResource): + """The Network Fabric resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkFabric Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkFabricProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkFabricProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkFabric Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "network_fabric_sku", + "fabric_version", + "router_ids", + "storage_account_configuration", + "fabric_locks", + "network_fabric_controller_id", + "rack_count", + "server_count_per_rack", + "ipv4_prefix", + "ipv6_prefix", + "fabric_asn", + "terminal_server_configuration", + "management_network_configuration", + "racks", + "l2_isolation_domains", + "l3_isolation_domains", + "hardware_alert_threshold", + "control_plane_acls", + "feature_flags", + "trusted_ip_prefixes", + "unique_rd_configuration", + "storage_array_count", + "active_commit_batches", + "secret_rotation_summary", + "last_operation", + "authorized_transceiver", + "configuration_state", + "provisioning_state", + "administrative_state", + "qos_configuration", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkFabricProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkFabricController(TrackedResource): + """The Network Fabric Controller resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkFabricController Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkFabricControllerProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkFabricController Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "infrastructure_express_route_connections", + "workload_express_route_connections", + "infrastructure_services", + "workload_services", + "managed_resource_group_configuration", + "network_fabric_ids", + "is_workload_management_network_enabled", + "tenant_internet_gateway_ids", + "ipv4_address_space", + "ipv6_address_space", + "nfc_sku", + "last_operation", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkFabricControllerProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkFabricControllerPatch(TagsUpdate): + """The Network Fabric Controller Patch payload definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Fabric Controller patch properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkFabricControllerPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabric Controller patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["infrastructure_express_route_connections", "workload_express_route_connections"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkFabricControllerPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkFabricControllerPatchProperties(_Model): + """Network Fabric Controller patch properties. + + :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure + ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is + dedicated for Infrastructure services. (This is a Mandatory attribute). + :vartype infrastructure_express_route_connections: + list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] + :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute + CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for + Workload services. (This is a Mandatory attribute). + :vartype workload_express_route_connections: + list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] + """ + + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = rest_field( + name="infrastructureExpressRouteConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create + and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a + Mandatory attribute).""" + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = rest_field( + name="workloadExpressRouteConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """As part of an update, the workload ExpressRoute CircuitID should be provided to create and + Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory + attribute).""" + + @overload + def __init__( + self, + *, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricControllerProperties(_Model): + """NetworkFabricControllerProperties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure + ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is + dedicated for Infrastructure services. (This is a Mandatory attribute). + :vartype infrastructure_express_route_connections: + list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] + :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute + CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for + Workload services. (This is a Mandatory attribute). + :vartype workload_express_route_connections: + list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] + :ivar infrastructure_services: InfrastructureServices IP ranges. + :vartype infrastructure_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices + :ivar workload_services: WorkloadServices IP ranges. + :vartype workload_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices + :ivar managed_resource_group_configuration: Managed Resource Group configuration properties. + :vartype managed_resource_group_configuration: + ~azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration + :ivar network_fabric_ids: The NF-ID will be an input parameter used by the NF to link and get + associated with the parent NFC Service. + :vartype network_fabric_ids: list[str] + :ivar is_workload_management_network_enabled: A workload management network is required for all + the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are + required to access internet or any other MSFT/Public endpoints. Known values are: "True" and + "False". + :vartype is_workload_management_network_enabled: str or + ~azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled + :ivar tenant_internet_gateway_ids: List of tenant InternetGateway resource IDs. + :vartype tenant_internet_gateway_ids: list[str] + :ivar ipv4_address_space: IPv4 Network Fabric Controller Address Space. + :vartype ipv4_address_space: str + :ivar ipv6_address_space: IPv6 Network Fabric Controller Address Space. + :vartype ipv6_address_space: str + :ivar nfc_sku: Network Fabric Controller SKU. Known values are: "Basic", "Standard", and + "HighPerformance". + :vartype nfc_sku: str or ~azure.mgmt.managednetworkfabric.models.NfcSku + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is + Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on + the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", + "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = rest_field( + name="infrastructureExpressRouteConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create + and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a + Mandatory attribute).""" + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = rest_field( + name="workloadExpressRouteConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """As part of an update, the workload ExpressRoute CircuitID should be provided to create and + Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory + attribute).""" + infrastructure_services: Optional["_models.ControllerServices"] = rest_field( + name="infrastructureServices", visibility=["read"] + ) + """InfrastructureServices IP ranges.""" + workload_services: Optional["_models.ControllerServices"] = rest_field(name="workloadServices", visibility=["read"]) + """WorkloadServices IP ranges.""" + managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = rest_field( + name="managedResourceGroupConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Managed Resource Group configuration properties.""" + network_fabric_ids: Optional[list[str]] = rest_field(name="networkFabricIds", visibility=["read"]) + """The NF-ID will be an input parameter used by the NF to link and get associated with the parent + NFC Service.""" + is_workload_management_network_enabled: Optional[Union[str, "_models.IsWorkloadManagementNetworkEnabled"]] = ( + rest_field( + name="isWorkloadManagementNetworkEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """A workload management network is required for all the tenant (workload) traffic. This traffic + is only dedicated for Tenant workloads which are required to access internet or any other + MSFT/Public endpoints. Known values are: \"True\" and \"False\".""" + tenant_internet_gateway_ids: Optional[list[str]] = rest_field(name="tenantInternetGatewayIds", visibility=["read"]) + """List of tenant InternetGateway resource IDs.""" + ipv4_address_space: Optional[str] = rest_field( + name="ipv4AddressSpace", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Network Fabric Controller Address Space.""" + ipv6_address_space: Optional[str] = rest_field( + name="ipv6AddressSpace", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Network Fabric Controller Address Space.""" + nfc_sku: Optional[Union[str, "_models.NfcSku"]] = rest_field( + name="nfcSku", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabric Controller SKU. Known values are: \"Basic\", \"Standard\", and + \"HighPerformance\".""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded + or Failed. During this process, the states keep changing based on the status of NFC + provisioning. Known values are: \"Accepted\", \"Succeeded\", \"Updating\", \"Deleting\", + \"Failed\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, + managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = None, + is_workload_management_network_enabled: Optional[ + Union[str, "_models.IsWorkloadManagementNetworkEnabled"] + ] = None, + ipv4_address_space: Optional[str] = None, + ipv6_address_space: Optional[str] = None, + nfc_sku: Optional[Union[str, "_models.NfcSku"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricLockRequest(_Model): + """Network Fabric Lock Request. + + :ivar lock_type: Type of lock to be applied. Known values are: "Administrative" and + "Configuration". + :vartype lock_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockType + :ivar action: Action to be performed on the lock. Known values are: "Lock" and "Unlock". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockAction + """ + + lock_type: Optional[Union[str, "_models.NetworkFabricLockType"]] = rest_field( + name="lockType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of lock to be applied. Known values are: \"Administrative\" and \"Configuration\".""" + action: Optional[Union[str, "_models.NetworkFabricLockAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action to be performed on the lock. Known values are: \"Lock\" and \"Unlock\".""" + + @overload + def __init__( + self, + *, + lock_type: Optional[Union[str, "_models.NetworkFabricLockType"]] = None, + action: Optional[Union[str, "_models.NetworkFabricLockAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricPatch(TagsUpdate): + """The Network Fabric resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Fabric Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkFabricPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabric Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "rack_count", + "server_count_per_rack", + "ipv4_prefix", + "ipv6_prefix", + "fabric_asn", + "terminal_server_configuration", + "management_network_configuration", + "storage_account_configuration", + "hardware_alert_threshold", + "control_plane_acls", + "trusted_ip_prefixes", + "unique_rd_configuration", + "qos_configuration", + "feature_flags", + "authorized_transceiver", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkFabricPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkFabricPatchProperties(_Model): + """Network Fabric Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar rack_count: Number of compute racks associated to Network Fabric. + :vartype rack_count: int + :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. + :vartype server_count_per_rack: int + :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + :vartype ipv4_prefix: str + :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + :vartype ipv6_prefix: str + :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. + :vartype fabric_asn: int + :ivar terminal_server_configuration: Network and credentials configuration already applied to + terminal server. + :vartype terminal_server_configuration: + ~azure.mgmt.managednetworkfabric.models.TerminalServerPatchConfiguration + :ivar management_network_configuration: Configuration to be used to setup the management + network. + :vartype management_network_configuration: + ~azure.mgmt.managednetworkfabric.models.ManagementNetworkPatchConfiguration + :ivar storage_account_configuration: Bring your own storage account configurations for Network + Fabric. + :vartype storage_account_configuration: + ~azure.mgmt.managednetworkfabric.models.StorageAccountPatchConfiguration + :ivar hardware_alert_threshold: Hardware alert threshold percentage. Possible values are from + 20 to 100. + :vartype hardware_alert_threshold: int + :ivar control_plane_acls: Control Plane Access Control List ARM resource IDs. + :vartype control_plane_acls: list[str] + :ivar trusted_ip_prefixes: Trusted IP Prefix ARM resource IDs. + :vartype trusted_ip_prefixes: list[str] + :ivar unique_rd_configuration: Unique Route Distinguisher configuration. + :vartype unique_rd_configuration: + ~azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherPatchProperties + :ivar qos_configuration: NetworkFabric QoS Configuration. + :vartype qos_configuration: ~azure.mgmt.managednetworkfabric.models.QosPatchProperties + :ivar feature_flags: NetworkFabric feature flag configuration information. + :vartype feature_flags: list[~azure.mgmt.managednetworkfabric.models.FeatureFlagProperties] + :ivar authorized_transceiver: Authorized transciever configuration for NetworkFabric. + :vartype authorized_transceiver: + ~azure.mgmt.managednetworkfabric.models.AuthorizedTransceiverPatchProperties + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + rack_count: Optional[int] = rest_field(name="rackCount", visibility=["read", "create", "update", "delete", "query"]) + """Number of compute racks associated to Network Fabric.""" + server_count_per_rack: Optional[int] = rest_field( + name="serverCountPerRack", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of servers.Possible values are from 1-16.""" + ipv4_prefix: Optional[str] = rest_field( + name="ipv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4Prefix for Management Network. Example: 10.1.0.0/19.""" + ipv6_prefix: Optional[str] = rest_field( + name="ipv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read", "create", "update", "delete", "query"]) + """ASN of CE devices for CE/PE connectivity.""" + terminal_server_configuration: Optional["_models.TerminalServerPatchConfiguration"] = rest_field( + name="terminalServerConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Network and credentials configuration already applied to terminal server.""" + management_network_configuration: Optional["_models.ManagementNetworkPatchConfiguration"] = rest_field( + name="managementNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to be used to setup the management network.""" + storage_account_configuration: Optional["_models.StorageAccountPatchConfiguration"] = rest_field( + name="storageAccountConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Bring your own storage account configurations for Network Fabric.""" + hardware_alert_threshold: Optional[int] = rest_field( + name="hardwareAlertThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """Hardware alert threshold percentage. Possible values are from 20 to 100.""" + control_plane_acls: Optional[list[str]] = rest_field( + name="controlPlaneAcls", visibility=["read", "create", "update", "delete", "query"] + ) + """Control Plane Access Control List ARM resource IDs.""" + trusted_ip_prefixes: Optional[list[str]] = rest_field( + name="trustedIpPrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """Trusted IP Prefix ARM resource IDs.""" + unique_rd_configuration: Optional["_models.UniqueRouteDistinguisherPatchProperties"] = rest_field( + name="uniqueRdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique Route Distinguisher configuration.""" + qos_configuration: Optional["_models.QosPatchProperties"] = rest_field( + name="qosConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric QoS Configuration.""" + feature_flags: Optional[list["_models.FeatureFlagProperties"]] = rest_field( + name="featureFlags", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric feature flag configuration information.""" + authorized_transceiver: Optional["_models.AuthorizedTransceiverPatchProperties"] = rest_field( + name="authorizedTransceiver", visibility=["read", "create", "update", "delete", "query"] + ) + """Authorized transciever configuration for NetworkFabric.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + rack_count: Optional[int] = None, + server_count_per_rack: Optional[int] = None, + ipv4_prefix: Optional[str] = None, + ipv6_prefix: Optional[str] = None, + fabric_asn: Optional[int] = None, + terminal_server_configuration: Optional["_models.TerminalServerPatchConfiguration"] = None, + management_network_configuration: Optional["_models.ManagementNetworkPatchConfiguration"] = None, + storage_account_configuration: Optional["_models.StorageAccountPatchConfiguration"] = None, + hardware_alert_threshold: Optional[int] = None, + control_plane_acls: Optional[list[str]] = None, + trusted_ip_prefixes: Optional[list[str]] = None, + unique_rd_configuration: Optional["_models.UniqueRouteDistinguisherPatchProperties"] = None, + qos_configuration: Optional["_models.QosPatchProperties"] = None, + feature_flags: Optional[list["_models.FeatureFlagProperties"]] = None, + authorized_transceiver: Optional["_models.AuthorizedTransceiverPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricProperties(AnnotationResource): + """Network Fabric Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_fabric_sku: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once + the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The + SKU determines whether it is a single / multi rack Network Fabric. Required. + :vartype network_fabric_sku: str + :ivar fabric_version: The version of Network Fabric. + :vartype fabric_version: str + :ivar router_ids: Array of router IDs. + :vartype router_ids: list[str] + :ivar storage_account_configuration: Bring your own storage account configurations for Network + Fabric. + :vartype storage_account_configuration: + ~azure.mgmt.managednetworkfabric.models.StorageAccountConfiguration + :ivar fabric_locks: Network Fabric Lock details. + :vartype fabric_locks: list[~azure.mgmt.managednetworkfabric.models.FabricLockProperties] + :ivar network_fabric_controller_id: Azure resource ID for the NetworkFabricController the + NetworkFabric belongs. Required. + :vartype network_fabric_controller_id: str + :ivar rack_count: Number of compute racks associated to Network Fabric. + :vartype rack_count: int + :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. Required. + :vartype server_count_per_rack: int + :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required. + :vartype ipv4_prefix: str + :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + :vartype ipv6_prefix: str + :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. Required. + :vartype fabric_asn: int + :ivar terminal_server_configuration: Network and credentials configuration currently applied to + terminal server. Required. + :vartype terminal_server_configuration: + ~azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration + :ivar management_network_configuration: Configuration to be used to setup the management + network. Required. + :vartype management_network_configuration: + ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties + :ivar racks: List of NetworkRack resource IDs under the Network Fabric. The number of racks + allowed depends on the Network Fabric SKU. + :vartype racks: list[str] + :ivar l2_isolation_domains: List of L2 Isolation Domain resource IDs under the Network Fabric. + :vartype l2_isolation_domains: list[str] + :ivar l3_isolation_domains: List of L3 Isolation Domain resource IDs under the Network Fabric. + :vartype l3_isolation_domains: list[str] + :ivar hardware_alert_threshold: Hardware alert threshold percentage. Possible values are from + 20 to 100. + :vartype hardware_alert_threshold: int + :ivar control_plane_acls: Control Plane Access Control List ARM resource IDs. + :vartype control_plane_acls: list[str] + :ivar feature_flags: NetworkFabric feature flag configuration information. + :vartype feature_flags: list[~azure.mgmt.managednetworkfabric.models.FeatureFlagProperties] + :ivar trusted_ip_prefixes: Trusted IP Prefixes ARM resource IDs. + :vartype trusted_ip_prefixes: list[str] + :ivar unique_rd_configuration: Unique Route Distinguisher configuration. + :vartype unique_rd_configuration: + ~azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherProperties + :ivar storage_array_count: Number of Storage arrays associated with the Network Fabric. + :vartype storage_array_count: int + :ivar active_commit_batches: Active commit batch identifiers. + :vartype active_commit_batches: list[str] + :ivar secret_rotation_summary: Overview of secret rotation for the Network Fabric. + :vartype secret_rotation_summary: ~azure.mgmt.managednetworkfabric.models.SecretRotationSummary + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar authorized_transceiver: Authorized transciever configuration for NetworkFabric. + :vartype authorized_transceiver: + ~azure.mgmt.managednetworkfabric.models.AuthorizedTransceiverProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is + Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on + the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", + "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar qos_configuration: NetworkFabric QoS Configuration. + :vartype qos_configuration: ~azure.mgmt.managednetworkfabric.models.QosProperties + """ + + network_fabric_sku: str = rest_field(name="networkFabricSku", visibility=["read", "create"]) + """Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a + particular SKU, only supported racks can be added to the Network Fabric. The SKU determines + whether it is a single / multi rack Network Fabric. Required.""" + fabric_version: Optional[str] = rest_field( + name="fabricVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of Network Fabric.""" + router_ids: Optional[list[str]] = rest_field(name="routerIds", visibility=["read"]) + """Array of router IDs.""" + storage_account_configuration: Optional["_models.StorageAccountConfiguration"] = rest_field( + name="storageAccountConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Bring your own storage account configurations for Network Fabric.""" + fabric_locks: Optional[list["_models.FabricLockProperties"]] = rest_field(name="fabricLocks", visibility=["read"]) + """Network Fabric Lock details.""" + network_fabric_controller_id: str = rest_field(name="networkFabricControllerId", visibility=["read", "create"]) + """Azure resource ID for the NetworkFabricController the NetworkFabric belongs. Required.""" + rack_count: Optional[int] = rest_field(name="rackCount", visibility=["read", "create", "update", "delete", "query"]) + """Number of compute racks associated to Network Fabric.""" + server_count_per_rack: int = rest_field( + name="serverCountPerRack", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of servers.Possible values are from 1-16. Required.""" + ipv4_prefix: str = rest_field(name="ipv4Prefix", visibility=["read", "create", "update", "delete", "query"]) + """IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required.""" + ipv6_prefix: Optional[str] = rest_field( + name="ipv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.""" + fabric_asn: int = rest_field(name="fabricASN", visibility=["read", "create", "update", "delete", "query"]) + """ASN of CE devices for CE/PE connectivity. Required.""" + terminal_server_configuration: "_models.TerminalServerConfiguration" = rest_field( + name="terminalServerConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Network and credentials configuration currently applied to terminal server. Required.""" + management_network_configuration: "_models.ManagementNetworkConfigurationProperties" = rest_field( + name="managementNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to be used to setup the management network. Required.""" + racks: Optional[list[str]] = rest_field(visibility=["read"]) + """List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends + on the Network Fabric SKU.""" + l2_isolation_domains: Optional[list[str]] = rest_field(name="l2IsolationDomains", visibility=["read"]) + """List of L2 Isolation Domain resource IDs under the Network Fabric.""" + l3_isolation_domains: Optional[list[str]] = rest_field(name="l3IsolationDomains", visibility=["read"]) + """List of L3 Isolation Domain resource IDs under the Network Fabric.""" + hardware_alert_threshold: Optional[int] = rest_field( + name="hardwareAlertThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """Hardware alert threshold percentage. Possible values are from 20 to 100.""" + control_plane_acls: Optional[list[str]] = rest_field( + name="controlPlaneAcls", visibility=["read", "create", "update", "delete", "query"] + ) + """Control Plane Access Control List ARM resource IDs.""" + feature_flags: Optional[list["_models.FeatureFlagProperties"]] = rest_field( + name="featureFlags", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric feature flag configuration information.""" + trusted_ip_prefixes: Optional[list[str]] = rest_field( + name="trustedIpPrefixes", visibility=["read", "create", "update", "delete", "query"] + ) + """Trusted IP Prefixes ARM resource IDs.""" + unique_rd_configuration: Optional["_models.UniqueRouteDistinguisherProperties"] = rest_field( + name="uniqueRdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique Route Distinguisher configuration.""" + storage_array_count: Optional[int] = rest_field( + name="storageArrayCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Number of Storage arrays associated with the Network Fabric.""" + active_commit_batches: Optional[list[str]] = rest_field(name="activeCommitBatches", visibility=["read"]) + """Active commit batch identifiers.""" + secret_rotation_summary: Optional["_models.SecretRotationSummary"] = rest_field( + name="secretRotationSummary", visibility=["read"] + ) + """Overview of secret rotation for the Network Fabric.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + authorized_transceiver: Optional["_models.AuthorizedTransceiverProperties"] = rest_field( + name="authorizedTransceiver", visibility=["read", "create", "update", "delete", "query"] + ) + """Authorized transciever configuration for NetworkFabric.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded + or Failed. During this process, the states keep changing based on the status of NFC + provisioning. Known values are: \"Accepted\", \"Succeeded\", \"Updating\", \"Deleting\", + \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + qos_configuration: Optional["_models.QosProperties"] = rest_field( + name="qosConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkFabric QoS Configuration.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + network_fabric_sku: str, + network_fabric_controller_id: str, + server_count_per_rack: int, + ipv4_prefix: str, + fabric_asn: int, + terminal_server_configuration: "_models.TerminalServerConfiguration", + management_network_configuration: "_models.ManagementNetworkConfigurationProperties", + annotation: Optional[str] = None, + fabric_version: Optional[str] = None, + storage_account_configuration: Optional["_models.StorageAccountConfiguration"] = None, + rack_count: Optional[int] = None, + ipv6_prefix: Optional[str] = None, + hardware_alert_threshold: Optional[int] = None, + control_plane_acls: Optional[list[str]] = None, + feature_flags: Optional[list["_models.FeatureFlagProperties"]] = None, + trusted_ip_prefixes: Optional[list[str]] = None, + unique_rd_configuration: Optional["_models.UniqueRouteDistinguisherProperties"] = None, + storage_array_count: Optional[int] = None, + authorized_transceiver: Optional["_models.AuthorizedTransceiverProperties"] = None, + qos_configuration: Optional["_models.QosProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricResyncCertificatesResponse(_Model): + """Response body for a ResyncCertificates request on a Network Fabric. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricResyncPasswordsResponse(_Model): + """Response body for a ResyncPasswords request on a Network Fabric. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricRotateCertificatesResponse(_Model): + """Response body for a RotateCertificates request on a Network Fabric. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricRotatePasswordsResponse(_Model): + """Response body for a RotatePasswords request on a Network Fabric. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkFabricSku(ProxyResource): + """The Network Fabric SKU resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The Network Fabric SKU properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSkuProperties + """ + + properties: "_models.NetworkFabricSkuProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Network Fabric SKU properties. Required.""" + + __flattened_items = [ + "type", + "max_compute_racks", + "maximum_server_count", + "supported_versions", + "details", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.NetworkFabricSkuProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkFabricSkuProperties(_Model): + """Network Fabric SKU Properties define properties of the resource. + + :ivar type: Type of Network Fabric SKU. Known values are: "SingleRack" and "MultiRack". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.FabricSkuType + :ivar max_compute_racks: Maximum number of compute racks available for this Network Fabric SKU. + The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. + :vartype max_compute_racks: int + :ivar maximum_server_count: Maximum number of servers available for this Network Fabric SKU. + :vartype maximum_server_count: int + :ivar supported_versions: List of supported Network Fabric SKU versions. + :vartype supported_versions: list[str] + :ivar details: URL providing detailed configuration of the fabric SKU. + :vartype details: str + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + """ + + type: Optional[Union[str, "_models.FabricSkuType"]] = rest_field(visibility=["read"]) + """Type of Network Fabric SKU. Known values are: \"SingleRack\" and \"MultiRack\".""" + max_compute_racks: Optional[int] = rest_field( + name="maxComputeRacks", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of compute racks available for this Network Fabric SKU. The value of max count + racks is 4 for 4 rack SKU and 8 for 8 rack SKU.""" + maximum_server_count: Optional[int] = rest_field( + name="maximumServerCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of servers available for this Network Fabric SKU.""" + supported_versions: Optional[list[str]] = rest_field(name="supportedVersions", visibility=["read"]) + """List of supported Network Fabric SKU versions.""" + details: Optional[str] = rest_field(visibility=["read"]) + """URL providing detailed configuration of the fabric SKU.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + max_compute_racks: Optional[int] = None, + maximum_server_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkInterface(ProxyResource): + """Defines the NetworkInterface resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The NetworkInterface properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkInterfaceProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkInterfaceProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkInterface properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "physical_identifier", + "connected_to", + "interface_type", + "ipv4_address", + "ipv6_address", + "description", + "additional_description", + "last_operation", + "network_fabric_id", + "provisioning_state", + "administrative_state", + "configuration_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.NetworkInterfaceProperties", + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkInterfacePatch(_Model): + """The NetworkInterfacePatch resource definition. + + :ivar properties: Network Interface Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkInterfacePatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Interface Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "additional_description"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NetworkInterfacePatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkInterfacePatchProperties(AnnotationResource): + """Network Interface Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar additional_description: Additional description of the interface. + :vartype additional_description: str + """ + + additional_description: Optional[str] = rest_field( + name="additionalDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional description of the interface.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + additional_description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkInterfaceProperties(AnnotationResource): + """Network Interface Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar physical_identifier: Physical Identifier of the network interface. + :vartype physical_identifier: str + :ivar connected_to: The ARM resource id of the interface or compute server its connected to. + :vartype connected_to: str + :ivar interface_type: The Interface Type. Example: Management/Data. Known values are: + "Management" and "Data". + :vartype interface_type: str or ~azure.mgmt.managednetworkfabric.models.InterfaceType + :ivar ipv4_address: IPv4Address of the interface. + :vartype ipv4_address: str + :ivar ipv6_address: IPv6Address of the interface. + :vartype ipv6_address: str + :ivar description: Description of the interface. + :vartype description: str + :ivar additional_description: Additional description of the interface. + :vartype additional_description: str + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar network_fabric_id: Associated Network Fabric Resource ID. + :vartype network_fabric_id: str + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + physical_identifier: Optional[str] = rest_field(name="physicalIdentifier", visibility=["read"]) + """Physical Identifier of the network interface.""" + connected_to: Optional[str] = rest_field(name="connectedTo", visibility=["read"]) + """The ARM resource id of the interface or compute server its connected to.""" + interface_type: Optional[Union[str, "_models.InterfaceType"]] = rest_field( + name="interfaceType", visibility=["read"] + ) + """The Interface Type. Example: Management/Data. Known values are: \"Management\" and \"Data\".""" + ipv4_address: Optional[str] = rest_field(name="ipv4Address", visibility=["read"]) + """IPv4Address of the interface.""" + ipv6_address: Optional[str] = rest_field(name="ipv6Address", visibility=["read"]) + """IPv6Address of the interface.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of the interface.""" + additional_description: Optional[str] = rest_field( + name="additionalDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Additional description of the interface.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + network_fabric_id: Optional[str] = rest_field(name="networkFabricId", visibility=["read"]) + """Associated Network Fabric Resource ID.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + additional_description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkMonitor(TrackedResource): + """The NetworkMonitor resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkMonitor properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorProperties + """ + + properties: "_models.NetworkMonitorProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkMonitor properties. Required.""" + + __flattened_items = [ + "annotation", + "bmp_configuration", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkMonitorProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkMonitorPatch(TagsUpdate): + """The Network Monitor Patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Monitor Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorPatchProperties + """ + + properties: Optional["_models.NetworkMonitorPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Monitor Patch properties.""" + + __flattened_items = ["bmp_configuration"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkMonitorPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkMonitorPatchProperties(_Model): + """The Network Monitor Patch Properties. + + :ivar bmp_configuration: BGP Monitoring Protocol (BMP) Configurations for the Network Monitor. + :vartype bmp_configuration: + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationPatchProperties + """ + + bmp_configuration: Optional["_models.BmpConfigurationPatchProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Monitoring Protocol (BMP) Configurations for the Network Monitor.""" + + @overload + def __init__( + self, + *, + bmp_configuration: Optional["_models.BmpConfigurationPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkMonitorProperties(AnnotationResource): + """Network Monitor Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar bmp_configuration: BMP Configurations for the Network Fabric. + :vartype bmp_configuration: ~azure.mgmt.managednetworkfabric.models.BmpConfigurationProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provides you the latest status of the NetworkMonitor resource. Known + values are: "Accepted", "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + bmp_configuration: Optional["_models.BmpConfigurationProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BMP Configurations for the Network Fabric.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provides you the latest status of the NetworkMonitor resource. Known values are: \"Accepted\", + \"Succeeded\", \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + bmp_configuration: Optional["_models.BmpConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkPacketBroker(TrackedResource): + """The NetworkPacketBroker resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkPacketBroker properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkPacketBrokerProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkPacketBroker properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "network_fabric_id", + "network_device_ids", + "source_interface_ids", + "network_tap_ids", + "neighbor_group_ids", + "last_operation", + "provisioning_state", + "configuration_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkPacketBrokerProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkPacketBrokerPatch(TagsUpdate): + """The NetworkPacketBroker patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkPacketBrokerProperties(_Model): + """Network Packet Broker Properties defines the properties of the resource. + + :ivar network_fabric_id: ARM resource ID of the Network Fabric. Required. + :vartype network_fabric_id: str + :ivar network_device_ids: List of ARM resource IDs of Network Devices [NPB]. + :vartype network_device_ids: list[str] + :ivar source_interface_ids: List of network interfaces across NPB devices that are used to + mirror source traffic. + :vartype source_interface_ids: list[str] + :ivar network_tap_ids: List of network Tap IDs configured on NPB. + :vartype network_tap_ids: list[str] + :ivar neighbor_group_ids: List of neighbor group IDs configured on NPB. + :vartype neighbor_group_ids: list[str] + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + network_fabric_id: str = rest_field(name="networkFabricId", visibility=["read", "create"]) + """ARM resource ID of the Network Fabric. Required.""" + network_device_ids: Optional[list[str]] = rest_field(name="networkDeviceIds", visibility=["read"]) + """List of ARM resource IDs of Network Devices [NPB].""" + source_interface_ids: Optional[list[str]] = rest_field(name="sourceInterfaceIds", visibility=["read"]) + """List of network interfaces across NPB devices that are used to mirror source traffic.""" + network_tap_ids: Optional[list[str]] = rest_field(name="networkTapIds", visibility=["read"]) + """List of network Tap IDs configured on NPB.""" + neighbor_group_ids: Optional[list[str]] = rest_field(name="neighborGroupIds", visibility=["read"]) + """List of neighbor group IDs configured on NPB.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + network_fabric_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkRack(TrackedResource): + """The Network Rack resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Network Rack Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkRackProperties + """ + + properties: "_models.NetworkRackProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Network Rack Properties. Required.""" + + __flattened_items = [ + "annotation", + "network_rack_type", + "network_fabric_id", + "network_devices", + "last_operation", + "provisioning_state", + "configuration_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkRackProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkRackPatch(_Model): + """Network Rack patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkRackProperties(AnnotationResource): + """Network Rack Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_rack_type: Network Rack SKU name. Known values are: "Aggregate", "Compute", and + "Combined". + :vartype network_rack_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkRackType + :ivar network_fabric_id: ARM resource ID of the Network Fabric. Required. + :vartype network_fabric_id: str + :ivar network_devices: List of network device ARM resource IDs. + :vartype network_devices: list[str] + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + """ + + network_rack_type: Optional[Union[str, "_models.NetworkRackType"]] = rest_field( + name="networkRackType", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Rack SKU name. Known values are: \"Aggregate\", \"Compute\", and \"Combined\".""" + network_fabric_id: str = rest_field( + name="networkFabricId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM resource ID of the Network Fabric. Required.""" + network_devices: Optional[list[str]] = rest_field(name="networkDevices", visibility=["read"]) + """List of network device ARM resource IDs.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + + @overload + def __init__( + self, + *, + network_fabric_id: str, + annotation: Optional[str] = None, + network_rack_type: Optional[Union[str, "_models.NetworkRackType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTap(TrackedResource): + """The Network Tap resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkTap Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkTapProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkTapProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The NetworkTap Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "network_packet_broker_id", + "source_tap_rule_id", + "network_fabric_ids", + "destinations", + "polling_type", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkTapProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkTapPatch(TagsUpdate): + """The NetworkFabric resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: NetworkTap resource patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkTapPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkTap resource patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = ["annotation", "polling_type", "destinations"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkTapPatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkTapPatchProperties(AnnotationResource): + """The Network Tap resource patch definition. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar polling_type: Polling type. Known values are: "Pull" and "Push". + :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType + :ivar destinations: List of destination properties to send the filter traffic. + :vartype destinations: list[~azure.mgmt.managednetworkfabric.models.DestinationPatchProperties] + """ + + polling_type: Optional[Union[str, "_models.PollingType"]] = rest_field( + name="pollingType", visibility=["read", "create", "update", "delete", "query"] + ) + """Polling type. Known values are: \"Pull\" and \"Push\".""" + destinations: Optional[list["_models.DestinationPatchProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of destination properties to send the filter traffic.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + polling_type: Optional[Union[str, "_models.PollingType"]] = None, + destinations: Optional[list["_models.DestinationPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapProperties(AnnotationResource): + """Network Tap Properties defines the properties of the resource. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar network_packet_broker_id: ARM resource ID of the Network Packet Broker. Required. + :vartype network_packet_broker_id: str + :ivar source_tap_rule_id: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + :vartype source_tap_rule_id: str + :ivar network_fabric_ids: Associated Network Fabric Resource IDs. + :vartype network_fabric_ids: list[str] + :ivar destinations: List of destinations to send the filter traffic. Required. + :vartype destinations: list[~azure.mgmt.managednetworkfabric.models.DestinationProperties] + :ivar polling_type: Polling type. Known values are: "Pull" and "Push". + :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Gets the configurations state of the resource. Known values are: + "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", + "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", + "PendingCommit", and "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is + Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on + the status of Network Tap provisioning. Known values are: "Accepted", "Succeeded", "Updating", + "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Example -Enabled/Disabled. + Known values are: "Enabled", "Disabled", "MAT", "RMA", "UnderMaintenance", and + "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + network_packet_broker_id: str = rest_field(name="networkPacketBrokerId", visibility=["read", "create"]) + """ARM resource ID of the Network Packet Broker. Required.""" + source_tap_rule_id: Optional[str] = rest_field(name="sourceTapRuleId", visibility=["read"]) + """Source Tap Rule Id. ARM Resource ID of the Network Tap Rule.""" + network_fabric_ids: Optional[list[str]] = rest_field(name="networkFabricIds", visibility=["read"]) + """Associated Network Fabric Resource IDs.""" + destinations: list["_models.DestinationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of destinations to send the filter traffic. Required.""" + polling_type: Optional[Union[str, "_models.PollingType"]] = rest_field( + name="pollingType", visibility=["read", "create", "update", "delete", "query"] + ) + """Polling type. Known values are: \"Pull\" and \"Push\".""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configurations state of the resource. Known values are: \"Succeeded\", \"Failed\", + \"Rejected\", \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", + \"Deprovisioned\", \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", + \"PendingCommit\", and \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded + or Failed. During this process, the states keep changing based on the status of Network Tap + provisioning. Known values are: \"Accepted\", \"Succeeded\", \"Updating\", \"Deleting\", + \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Example -Enabled/Disabled. Known values are: \"Enabled\", + \"Disabled\", \"MAT\", \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + network_packet_broker_id: str, + destinations: list["_models.DestinationProperties"], + annotation: Optional[str] = None, + polling_type: Optional[Union[str, "_models.PollingType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapResyncResponse(_Model): + """Response for NetworkTap Resync operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRule(TrackedResource): + """The NetworkTapRule resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The NetworkTapRule Properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkTapRuleProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentity + """ + + properties: "_models.NetworkTapRuleProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkTapRule Properties. Required.""" + identity: Optional["_models.ManagedServiceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "configuration_type", + "tap_rules_url", + "identity_selector", + "match_configurations", + "dynamic_match_configurations", + "network_tap_id", + "network_tap_ids", + "polling_interval_in_seconds", + "last_synced_time", + "global_network_tap_rule_actions", + "last_operation", + "network_fabric_ids", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.NetworkTapRuleProperties", + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ManagedServiceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkTapRuleAction(_Model): + """Action that need to performed. + + :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", + "Replicate", "Goto", "Redirect", and "Mirror". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.TapRuleActionType + :ivar truncate: Truncate. 0 indicates do not truncate. + :vartype truncate: str + :ivar is_timestamp_enabled: The parameter to enable or disable the timestamp. Known values are: + "True" and "False". + :vartype is_timestamp_enabled: str or + ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar destination_id: Destination Id. The ARM resource Id may be either Network To Network + Interconnect or NeighborGroup. + :vartype destination_id: str + :ivar match_configuration_name: The name of the match configuration. This is used when Goto + type is provided. + :vartype match_configuration_name: str + """ + + type: Optional[Union[str, "_models.TapRuleActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Drop\", \"Count\", \"Log\", + \"Replicate\", \"Goto\", \"Redirect\", and \"Mirror\".""" + truncate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Truncate. 0 indicates do not truncate.""" + is_timestamp_enabled: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="isTimestampEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """The parameter to enable or disable the timestamp. Known values are: \"True\" and \"False\".""" + destination_id: Optional[str] = rest_field( + name="destinationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination Id. The ARM resource Id may be either Network To Network Interconnect or + NeighborGroup.""" + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration. This is used when Goto type is provided.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.TapRuleActionType"]] = None, + truncate: Optional[str] = None, + is_timestamp_enabled: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + destination_id: Optional[str] = None, + match_configuration_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleActionPatch(_Model): + """Action that need to performed. + + :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", + "Replicate", "Goto", "Redirect", and "Mirror". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.TapRuleActionType + :ivar truncate: Truncate. 0 indicates do not truncate. + :vartype truncate: str + :ivar is_timestamp_enabled: The parameter to enable or disable the timestamp. Known values are: + "True" and "False". + :vartype is_timestamp_enabled: str or + ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar destination_id: Destination Id. The ARM resource Id may be either Network To Network + Interconnect or NeighborGroup. + :vartype destination_id: str + :ivar match_configuration_name: The name of the match configuration. This is used when Goto + type is provided. + :vartype match_configuration_name: str + """ + + type: Optional[Union[str, "_models.TapRuleActionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of actions that can be performed. Known values are: \"Drop\", \"Count\", \"Log\", + \"Replicate\", \"Goto\", \"Redirect\", and \"Mirror\".""" + truncate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Truncate. 0 indicates do not truncate.""" + is_timestamp_enabled: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="isTimestampEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """The parameter to enable or disable the timestamp. Known values are: \"True\" and \"False\".""" + destination_id: Optional[str] = rest_field( + name="destinationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination Id. The ARM resource Id may be either Network To Network Interconnect or + NeighborGroup.""" + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration. This is used when Goto type is provided.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.TapRuleActionType"]] = None, + truncate: Optional[str] = None, + is_timestamp_enabled: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + destination_id: Optional[str] = None, + match_configuration_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleMatchCondition(CommonMatchConditions): + """Defines the match condition that is supported to filter the traffic. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition + :ivar encapsulation_type: Encapsulation Type that needs to be matched. Known values are: "None" + and "GTPv1". + :vartype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType + :ivar port_condition: Defines the port condition that needs to be matched. + :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.PortCondition + """ + + encapsulation_type: Optional[Union[str, "_models.EncapsulationType"]] = rest_field( + name="encapsulationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Encapsulation Type that needs to be matched. Known values are: \"None\" and \"GTPv1\".""" + port_condition: Optional["_models.PortCondition"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the port condition that needs to be matched.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, + ip_condition: Optional["_models.IpMatchCondition"] = None, + encapsulation_type: Optional[Union[str, "_models.EncapsulationType"]] = None, + port_condition: Optional["_models.PortCondition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleMatchConditionPatch(CommonMatchConditionsPatch): + """Defines the match condition that is supported to filter the traffic. + + :ivar protocol_types: List of the protocols that need to be matched. + :vartype protocol_types: list[str] + :ivar vlan_match_condition: Vlan match condition that needs to be matched. + :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchConditionPatch + :ivar ip_condition: IP condition that needs to be matched. + :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchConditionPatch + :ivar encapsulation_type: Encapsulation Type that needs to be matched. Known values are: "None" + and "GTPv1". + :vartype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType + :ivar port_condition: Defines the port condition that needs to be matched. + :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.PortConditionPatch + """ + + encapsulation_type: Optional[Union[str, "_models.EncapsulationType"]] = rest_field( + name="encapsulationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Encapsulation Type that needs to be matched. Known values are: \"None\" and \"GTPv1\".""" + port_condition: Optional["_models.PortConditionPatch"] = rest_field( + name="portCondition", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the port condition that needs to be matched.""" + + @overload + def __init__( + self, + *, + protocol_types: Optional[list[str]] = None, + vlan_match_condition: Optional["_models.VlanMatchConditionPatch"] = None, + ip_condition: Optional["_models.IpMatchConditionPatch"] = None, + encapsulation_type: Optional[Union[str, "_models.EncapsulationType"]] = None, + port_condition: Optional["_models.PortConditionPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleMatchConfiguration(_Model): + """Defines the match configuration that are supported to filter the traffic. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration.. + :vartype sequence_number: int + :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_conditions: List of the match conditions. + :vartype match_conditions: + list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition] + :ivar actions: List of actions that need to be performed for the matched conditions. + :vartype actions: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction] + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration..""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of IP Address. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_conditions: Optional[list["_models.NetworkTapRuleMatchCondition"]] = rest_field( + name="matchConditions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the match conditions.""" + actions: Optional[list["_models.NetworkTapRuleAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of actions that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_conditions: Optional[list["_models.NetworkTapRuleMatchCondition"]] = None, + actions: Optional[list["_models.NetworkTapRuleAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleMatchConfigurationPatch(_Model): + """Defines the match configuration that are supported to filter the traffic. + + :ivar match_configuration_name: The name of the match configuration. + :vartype match_configuration_name: str + :ivar sequence_number: Sequence Number of the match configuration.. + :vartype sequence_number: int + :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". + :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType + :ivar match_conditions: List of the match conditions. + :vartype match_conditions: + list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConditionPatch] + :ivar actions: List of actions that need to be performed for the matched conditions. + :vartype actions: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleActionPatch] + """ + + match_configuration_name: Optional[str] = rest_field( + name="matchConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the match configuration.""" + sequence_number: Optional[int] = rest_field( + name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Sequence Number of the match configuration..""" + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = rest_field( + name="ipAddressType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of IP Address. IPv4 or IPv6. Known values are: \"IPv4\" and \"IPv6\".""" + match_conditions: Optional[list["_models.NetworkTapRuleMatchConditionPatch"]] = rest_field( + name="matchConditions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the match conditions.""" + actions: Optional[list["_models.NetworkTapRuleActionPatch"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of actions that need to be performed for the matched conditions.""" + + @overload + def __init__( + self, + *, + match_configuration_name: Optional[str] = None, + sequence_number: Optional[int] = None, + ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, + match_conditions: Optional[list["_models.NetworkTapRuleMatchConditionPatch"]] = None, + actions: Optional[list["_models.NetworkTapRuleActionPatch"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRulePatch(TagsUpdate): + """The NetworkTapRule resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: Network Tap Rule Patch properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatchProperties + :ivar identity: The managed service identities assigned to this resource. + :vartype identity: ~azure.mgmt.managednetworkfabric.models.ManagedServiceIdentityPatch + """ + + properties: Optional["_models.NetworkTapRulePatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Network Tap Rule Patch properties.""" + identity: Optional["_models.ManagedServiceIdentityPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The managed service identities assigned to this resource.""" + + __flattened_items = [ + "annotation", + "configuration_type", + "tap_rules_url", + "match_configurations", + "dynamic_match_configurations", + "identity_selector", + "global_network_tap_rule_actions", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.NetworkTapRulePatchProperties"] = None, + identity: Optional["_models.ManagedServiceIdentityPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkTapRulePatchProperties(_Model): + """Network Tap Rule Patch properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" + and "Inline". + :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType + :ivar tap_rules_url: Network Tap Rules file URL. + :vartype tap_rules_url: str + :ivar match_configurations: List of match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfigurationPatch] + :ivar dynamic_match_configurations: List of dynamic match configurations. + :vartype dynamic_match_configurations: + list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfigurationPatch] + :ivar identity_selector: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype identity_selector: ~azure.mgmt.managednetworkfabric.models.IdentitySelectorPatch + :ivar global_network_tap_rule_actions: Global network tap rule actions. + :vartype global_network_tap_rule_actions: + ~azure.mgmt.managednetworkfabric.models.GlobalNetworkTapRuleActionPatchProperties + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = rest_field( + name="configurationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Input method to configure Network Tap Rule. Known values are: \"File\" and \"Inline\".""" + tap_rules_url: Optional[str] = rest_field( + name="tapRulesUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Tap Rules file URL.""" + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfigurationPatch"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of match configurations.""" + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfigurationPatch"]] = rest_field( + name="dynamicMatchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of dynamic match configurations.""" + identity_selector: Optional["_models.IdentitySelectorPatch"] = rest_field( + name="identitySelector", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + global_network_tap_rule_actions: Optional["_models.GlobalNetworkTapRuleActionPatchProperties"] = rest_field( + name="globalNetworkTapRuleActions", visibility=["read", "create", "update", "delete", "query"] + ) + """Global network tap rule actions.""" + + @overload + def __init__( + self, + *, + annotation: Optional[str] = None, + configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, + tap_rules_url: Optional[str] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfigurationPatch"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfigurationPatch"]] = None, + identity_selector: Optional["_models.IdentitySelectorPatch"] = None, + global_network_tap_rule_actions: Optional["_models.GlobalNetworkTapRuleActionPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleProperties(_Model): + """Network Tap Rule Properties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar configuration_type: Input method to configure Network Tap Rule. Required. Known values + are: "File" and "Inline". + :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType + :ivar tap_rules_url: Network Tap Rules file URL. + :vartype tap_rules_url: str + :ivar identity_selector: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype identity_selector: ~azure.mgmt.managednetworkfabric.models.IdentitySelector + :ivar match_configurations: List of match configurations. + :vartype match_configurations: + list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] + :ivar dynamic_match_configurations: List of dynamic match configurations. + :vartype dynamic_match_configurations: + list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] + :ivar network_tap_id: The ARM resource Id of the NetworkTap. + :vartype network_tap_id: str + :ivar network_tap_ids: The ARM resource Id of the NetworkTap Rules. + :vartype network_tap_ids: list[str] + :ivar polling_interval_in_seconds: Polling interval in seconds. + :vartype polling_interval_in_seconds: int + :ivar last_synced_time: The last sync timestamp. + :vartype last_synced_time: ~datetime.datetime + :ivar global_network_tap_rule_actions: Global network tap rule actions. + :vartype global_network_tap_rule_actions: + ~azure.mgmt.managednetworkfabric.models.GlobalNetworkTapRuleActionProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar network_fabric_ids: Associated Network Fabric Resource IDs. + :vartype network_fabric_ids: list[str] + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + configuration_type: Union[str, "_models.ConfigurationType"] = rest_field( + name="configurationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Input method to configure Network Tap Rule. Required. Known values are: \"File\" and + \"Inline\".""" + tap_rules_url: Optional[str] = rest_field( + name="tapRulesUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Tap Rules file URL.""" + identity_selector: Optional["_models.IdentitySelector"] = rest_field( + name="identitySelector", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = rest_field( + name="matchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of match configurations.""" + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = rest_field( + name="dynamicMatchConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """List of dynamic match configurations.""" + network_tap_id: Optional[str] = rest_field(name="networkTapId", visibility=["read"]) + """The ARM resource Id of the NetworkTap.""" + network_tap_ids: Optional[list[str]] = rest_field(name="networkTapIds", visibility=["read"]) + """The ARM resource Id of the NetworkTap Rules.""" + polling_interval_in_seconds: Optional[int] = rest_field( + name="pollingIntervalInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Polling interval in seconds.""" + last_synced_time: Optional[datetime.datetime] = rest_field( + name="lastSyncedTime", visibility=["read"], format="rfc3339" + ) + """The last sync timestamp.""" + global_network_tap_rule_actions: Optional["_models.GlobalNetworkTapRuleActionProperties"] = rest_field( + name="globalNetworkTapRuleActions", visibility=["read", "create", "update", "delete", "query"] + ) + """Global network tap rule actions.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + network_fabric_ids: Optional[list[str]] = rest_field(name="networkFabricIds", visibility=["read"]) + """Associated Network Fabric Resource IDs.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + configuration_type: Union[str, "_models.ConfigurationType"], + annotation: Optional[str] = None, + tap_rules_url: Optional[str] = None, + identity_selector: Optional["_models.IdentitySelector"] = None, + match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, + dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, + polling_interval_in_seconds: Optional[int] = None, + global_network_tap_rule_actions: Optional["_models.GlobalNetworkTapRuleActionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkTapRuleResyncResponse(_Model): + """Response for Network Tap Rule resync operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkToNetworkInterconnect(ProxyResource): + """The Network To Network Interconnect resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: The NetworkToNetworkInterconnect Properties. Required. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectProperties + """ + + properties: "_models.NetworkToNetworkInterconnectProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The NetworkToNetworkInterconnect Properties. Required.""" + + __flattened_items = [ + "nni_type", + "is_management_type", + "use_option_b", + "layer2_configuration", + "option_b_layer3_configuration", + "npb_static_route_configuration", + "static_route_configuration", + "import_route_policy", + "export_route_policy", + "egress_acl_id", + "ingress_acl_id", + "micro_bfd_state", + "conditional_default_route_configuration", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.NetworkToNetworkInterconnectProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ProxyResourceBase(_Model): + """ProxyResourceBase with no property bag. + + :ivar id: Fully qualified resource ID for the resource. E.g. + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. + :vartype id: str + :ivar type: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + 'Microsoft.Storage/storageAccounts'. + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. E.g. + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + 'Microsoft.Storage/storageAccounts'.""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class NetworkToNetworkInterconnectPatch(ProxyResourceBase): + """The Network To Network Interconnect resource patch definition. + + :ivar id: Fully qualified resource ID for the resource. E.g. + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}'. + :vartype id: str + :ivar type: The type of the resource. E.g. 'Microsoft.Compute/virtualMachines' or + 'Microsoft.Storage/storageAccounts'. + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar properties: Resource properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatchProperties + """ + + properties: Optional["_models.NetworkToNetworkInterconnectPatchProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = [ + "layer2_configuration", + "option_b_layer3_configuration", + "npb_static_route_configuration", + "static_route_configuration", + "import_route_policy", + "export_route_policy", + "egress_acl_id", + "ingress_acl_id", + "micro_bfd_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.NetworkToNetworkInterconnectPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class NetworkToNetworkInterconnectPatchProperties(_Model): # pylint: disable=name-too-long + """Network Tap Rule Patch properties. + + :ivar layer2_configuration: Common properties for Layer2Configuration. + :vartype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2ConfigurationPatch + :ivar option_b_layer3_configuration: Common properties for Layer3Configuration. + :vartype option_b_layer3_configuration: + ~azure.mgmt.managednetworkfabric.models.OptionBLayer3ConfigurationPatchProperties + :ivar npb_static_route_configuration: NPB Static Route Configuration properties. + :vartype npb_static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfigurationPatch + :ivar static_route_configuration: Static Route Configuration. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.NniStaticRoutePatchConfiguration + :ivar import_route_policy: Import Route Policy information. + :vartype import_route_policy: + ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformationPatch + :ivar export_route_policy: Export Route Policy information. + :vartype export_route_policy: + ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformationPatch + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar micro_bfd_state: Micro BFD enabled/disabled state. Known values are: "Enabled" and + "Disabled". + :vartype micro_bfd_state: str or ~azure.mgmt.managednetworkfabric.models.MicroBfdState + """ + + layer2_configuration: Optional["_models.Layer2ConfigurationPatch"] = rest_field( + name="layer2Configuration", visibility=["read", "create", "update", "delete", "query"] + ) + """Common properties for Layer2Configuration.""" + option_b_layer3_configuration: Optional["_models.OptionBLayer3ConfigurationPatchProperties"] = rest_field( + name="optionBLayer3Configuration", visibility=["read", "create", "update", "delete", "query"] + ) + """Common properties for Layer3Configuration.""" + npb_static_route_configuration: Optional["_models.NpbStaticRouteConfigurationPatch"] = rest_field( + name="npbStaticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """NPB Static Route Configuration properties.""" + static_route_configuration: Optional["_models.NniStaticRoutePatchConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration.""" + import_route_policy: Optional["_models.ImportRoutePolicyInformationPatch"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy information.""" + export_route_policy: Optional["_models.ExportRoutePolicyInformationPatch"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy information.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + micro_bfd_state: Optional[Union[str, "_models.MicroBfdState"]] = rest_field( + name="microBfdState", visibility=["read", "create", "update", "delete", "query"] + ) + """Micro BFD enabled/disabled state. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + layer2_configuration: Optional["_models.Layer2ConfigurationPatch"] = None, + option_b_layer3_configuration: Optional["_models.OptionBLayer3ConfigurationPatchProperties"] = None, + npb_static_route_configuration: Optional["_models.NpbStaticRouteConfigurationPatch"] = None, + static_route_configuration: Optional["_models.NniStaticRoutePatchConfiguration"] = None, + import_route_policy: Optional["_models.ImportRoutePolicyInformationPatch"] = None, + export_route_policy: Optional["_models.ExportRoutePolicyInformationPatch"] = None, + egress_acl_id: Optional[str] = None, + ingress_acl_id: Optional[str] = None, + micro_bfd_state: Optional[Union[str, "_models.MicroBfdState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkToNetworkInterconnectProperties(_Model): + """Configuration used to setup CE-PE connectivity. + + :ivar nni_type: Type of NNI used. Example: CE | NPB. Known values are: "CE" and "NPB". + :vartype nni_type: str or ~azure.mgmt.managednetworkfabric.models.NniType + :ivar is_management_type: Configuration to use NNI for Infrastructure Management. Example: + True/False. Known values are: "True" and "False". + :vartype is_management_type: str or ~azure.mgmt.managednetworkfabric.models.IsManagementType + :ivar use_option_b: Based on this option layer3 parameters are mandatory. Example: True/False. + Required. Known values are: "True" and "False". + :vartype use_option_b: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + :ivar layer2_configuration: Common properties for Layer2 Configuration. + :vartype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2Configuration + :ivar option_b_layer3_configuration: Common properties for Layer3Configuration. + :vartype option_b_layer3_configuration: + ~azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration + :ivar npb_static_route_configuration: NPB Static Route Configuration properties. + :vartype npb_static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration + :ivar static_route_configuration: Static Route Configuration. + :vartype static_route_configuration: + ~azure.mgmt.managednetworkfabric.models.NniStaticRouteConfiguration + :ivar import_route_policy: Import Route Policy information. + :vartype import_route_policy: + ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation + :ivar export_route_policy: Export Route Policy information. + :vartype export_route_policy: + ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation + :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. + :vartype egress_acl_id: str + :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. + :vartype ingress_acl_id: str + :ivar micro_bfd_state: Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. + Known values are: "Enabled" and "Disabled". + :vartype micro_bfd_state: str or ~azure.mgmt.managednetworkfabric.models.MicroBfdState + :ivar conditional_default_route_configuration: Conditional Default Route Configuration + properties. + :vartype conditional_default_route_configuration: + ~azure.mgmt.managednetworkfabric.models.ConditionalDefaultRouteProperties + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + nni_type: Optional[Union[str, "_models.NniType"]] = rest_field( + name="nniType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of NNI used. Example: CE | NPB. Known values are: \"CE\" and \"NPB\".""" + is_management_type: Optional[Union[str, "_models.IsManagementType"]] = rest_field( + name="isManagementType", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration to use NNI for Infrastructure Management. Example: True/False. Known values are: + \"True\" and \"False\".""" + use_option_b: Union[str, "_models.BooleanEnumProperty"] = rest_field( + name="useOptionB", visibility=["read", "create", "update", "delete", "query"] + ) + """Based on this option layer3 parameters are mandatory. Example: True/False. Required. Known + values are: \"True\" and \"False\".""" + layer2_configuration: Optional["_models.Layer2Configuration"] = rest_field( + name="layer2Configuration", visibility=["read", "create", "update", "delete", "query"] + ) + """Common properties for Layer2 Configuration.""" + option_b_layer3_configuration: Optional["_models.OptionBLayer3Configuration"] = rest_field( + name="optionBLayer3Configuration", visibility=["read", "create", "update", "delete", "query"] + ) + """Common properties for Layer3Configuration.""" + npb_static_route_configuration: Optional["_models.NpbStaticRouteConfiguration"] = rest_field( + name="npbStaticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """NPB Static Route Configuration properties.""" + static_route_configuration: Optional["_models.NniStaticRouteConfiguration"] = rest_field( + name="staticRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Static Route Configuration.""" + import_route_policy: Optional["_models.ImportRoutePolicyInformation"] = rest_field( + name="importRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Import Route Policy information.""" + export_route_policy: Optional["_models.ExportRoutePolicyInformation"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Export Route Policy information.""" + egress_acl_id: Optional[str] = rest_field( + name="egressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Egress Acl. ARM resource ID of Access Control Lists.""" + ingress_acl_id: Optional[str] = rest_field( + name="ingressAclId", visibility=["read", "create", "update", "delete", "query"] + ) + """Ingress Acl. ARM resource ID of Access Control Lists.""" + micro_bfd_state: Optional[Union[str, "_models.MicroBfdState"]] = rest_field( + name="microBfdState", visibility=["read", "create", "update", "delete", "query"] + ) + """Micro Bidirectional Forwarding Detection (BFD) enabled/disabled state. Known values are: + \"Enabled\" and \"Disabled\".""" + conditional_default_route_configuration: Optional["_models.ConditionalDefaultRouteProperties"] = rest_field( + name="conditionalDefaultRouteConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Conditional Default Route Configuration properties.""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + use_option_b: Union[str, "_models.BooleanEnumProperty"], + nni_type: Optional[Union[str, "_models.NniType"]] = None, + is_management_type: Optional[Union[str, "_models.IsManagementType"]] = None, + layer2_configuration: Optional["_models.Layer2Configuration"] = None, + option_b_layer3_configuration: Optional["_models.OptionBLayer3Configuration"] = None, + npb_static_route_configuration: Optional["_models.NpbStaticRouteConfiguration"] = None, + static_route_configuration: Optional["_models.NniStaticRouteConfiguration"] = None, + import_route_policy: Optional["_models.ImportRoutePolicyInformation"] = None, + export_route_policy: Optional["_models.ExportRoutePolicyInformation"] = None, + egress_acl_id: Optional[str] = None, + ingress_acl_id: Optional[str] = None, + micro_bfd_state: Optional[Union[str, "_models.MicroBfdState"]] = None, + conditional_default_route_configuration: Optional["_models.ConditionalDefaultRouteProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniBmpPatchProperties(_Model): + """BGP Monitoring Protocol (BMP) patch properties. + + :ivar configuration_state: (BGP Monitoring Protocol (BMP) configuration state. Known values + are: "Enabled" and "Disabled". + :vartype configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + """ + + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = rest_field( + name="configurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """(BGP Monitoring Protocol (BMP) configuration state. Known values are: \"Enabled\" and + \"Disabled\".""" + + @overload + def __init__( + self, + *, + configuration_state: Optional[Union[str, "_models.BmpConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniBmpProperties(_Model): + """BGP Monitoring Protocol (BMP) properties. + + :ivar configuration_state: BGP Monitoring Protocol (BMP) Configuration State. Required. Known + values are: "Enabled" and "Disabled". + :vartype configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.BmpConfigurationState + """ + + configuration_state: Union[str, "_models.BmpConfigurationState"] = rest_field( + name="configurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Monitoring Protocol (BMP) Configuration State. Required. Known values are: \"Enabled\" and + \"Disabled\".""" + + @overload + def __init__( + self, + *, + configuration_state: Union[str, "_models.BmpConfigurationState"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniStaticRouteConfiguration(_Model): + """Static Route Configuration properties for NNI. + + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + """ + + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniStaticRoutePatchConfiguration(_Model): + """Static Route Configuration properties for NNI. + + :ivar bfd_configuration: Bidirectional Forwarding Detection (BFD) configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + """ + + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Bidirectional Forwarding Detection (BFD) configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniUpdateBfdAdministrativeStateRequest(_Model): + """NNI Bidirectional Forwarding Detection (BFD) Administrative State request. + + :ivar route_type: Route Type. Choose either Static or OptionA. Known values are: "Static" and + "OptionA". + :vartype route_type: str or ~azure.mgmt.managednetworkfabric.models.RouteType + :ivar administrative_state: State. Select either enable or disable. Known values are: + "Enabled", "Disabled", "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + """ + + route_type: Optional[Union[str, "_models.RouteType"]] = rest_field( + name="routeType", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Type. Choose either Static or OptionA. Known values are: \"Static\" and \"OptionA\".""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """State. Select either enable or disable. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + and \"RMA\".""" + + @overload + def __init__( + self, + *, + route_type: Optional[Union[str, "_models.RouteType"]] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniUpdateBfdAdministrativeStateResponse(_Model): + """NNI Bidirectional Forwarding Detection (BFD) Administrative State response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Properties of the NNI BFD Administrative State response. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.NniUpdateBfdAdministrativeStateResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the NNI BFD Administrative State response.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.NniUpdateBfdAdministrativeStateResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NniUpdateBfdAdministrativeStateResponseProperties(_Model): # pylint: disable=name-too-long + """NNI Bidirectional Forwarding Detection (BFD) Update Administrative State response. + + :ivar route_type: Route Type. Choose either Static or OptionA. Known values are: "Static" and + "OptionA". + :vartype route_type: str or ~azure.mgmt.managednetworkfabric.models.RouteType + :ivar administrative_state: State. Select either enable or disable. Known values are: + "Enabled", "Disabled", "MAT", and "RMA". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState + """ + + route_type: Optional[Union[str, "_models.RouteType"]] = rest_field( + name="routeType", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Type. Choose either Static or OptionA. Known values are: \"Static\" and \"OptionA\".""" + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read", "create", "update", "delete", "query"] + ) + """State. Select either enable or disable. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + and \"RMA\".""" + + @overload + def __init__( + self, + *, + route_type: Optional[Union[str, "_models.RouteType"]] = None, + administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NpbStaticRouteConfiguration(_Model): + """NPB Static Route Configuration properties. + + :ivar bfd_configuration: BFD Configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + """ + + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NpbStaticRouteConfigurationPatch(_Model): + """NPB Static Route Configuration properties. + + :ivar bfd_configuration: BFD Configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + """ + + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """REST API Operation. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for Azure Resource Manager/control-plane operations. + :vartype is_data_action: bool + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.managednetworkfabric.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", + and "user,system". + :vartype origin: str or ~azure.mgmt.managednetworkfabric.models.Origin + :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions + that are for internal only APIs. "Internal" + :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.ActionType + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + \"Microsoft.Compute/virtualMachines/write\", + \"Microsoft.Compute/virtualMachines/capture/action\".""" + is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) + """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and + \"false\" for Azure Resource Manager/control-plane operations.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Localized display information for this particular operation.""" + origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and + \"user,system\".""" + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) + """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for + internal only APIs. \"Internal\"""" + + @overload + def __init__( + self, + *, + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationDisplay(_Model): + """Localized display information for an operation. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring + Insights\" or \"Microsoft Compute\".""" + resource: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly name of the resource type related to this operation. E.g. \"Virtual + Machines\" or \"Job Schedule Collections\".""" + operation: Optional[str] = rest_field(visibility=["read"]) + """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create + or Update Virtual Machine\", \"Restart Virtual Machine\".""" + description: Optional[str] = rest_field(visibility=["read"]) + """The short, localized friendly description of the operation; suitable for tool tips and detailed + views.""" + + +class OperationStatusResult(_Model): + """The current status of an async operation. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OptionBLayer3Configuration(Layer3IpPrefixProperties): + """OptionB Layer3 Configuration properties. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. Required. + :vartype peer_asn: int + :ivar vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. Required. + :vartype vlan_id: int + :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. + :vartype fabric_asn: int + :ivar pe_loopback_ip_address: Provider Edge (PE) Loopback IP Address. + :vartype pe_loopback_ip_address: list[str] + :ivar bmp_configuration: BGP Monitoring Protocol (BMP) Configuration. + :vartype bmp_configuration: ~azure.mgmt.managednetworkfabric.models.NniBmpProperties + :ivar prefix_limits: OptionB Layer3 prefix limit configuration. + :vartype prefix_limits: + list[~azure.mgmt.managednetworkfabric.models.OptionBLayer3PrefixLimitProperties] + """ + + peer_asn: int = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """ASN of PE devices for CE/PE connectivity.Example : 28. Required.""" + vlan_id: int = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """VLAN for CE/PE Layer 3 connectivity.Example : 501. Required.""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """ASN of CE devices for CE/PE connectivity.""" + pe_loopback_ip_address: Optional[list[str]] = rest_field( + name="peLoopbackIpAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """Provider Edge (PE) Loopback IP Address.""" + bmp_configuration: Optional["_models.NniBmpProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Monitoring Protocol (BMP) Configuration.""" + prefix_limits: Optional[list["_models.OptionBLayer3PrefixLimitProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """OptionB Layer3 prefix limit configuration.""" + + @overload + def __init__( + self, + *, + peer_asn: int, + vlan_id: int, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + pe_loopback_ip_address: Optional[list[str]] = None, + bmp_configuration: Optional["_models.NniBmpProperties"] = None, + prefix_limits: Optional[list["_models.OptionBLayer3PrefixLimitProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OptionBLayer3ConfigurationPatchProperties(Layer3IpPrefixPatchProperties): # pylint: disable=name-too-long + """Common properties for Layer3Configuration. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. + :vartype peer_asn: int + :ivar vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. + :vartype vlan_id: int + :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. + :vartype fabric_asn: int + :ivar pe_loopback_ip_address: Provider Edge (PE) Loopback IP Address. + :vartype pe_loopback_ip_address: list[str] + :ivar bmp_configuration: BGP Monitoring Protocol (BMP) Configuration. + :vartype bmp_configuration: ~azure.mgmt.managednetworkfabric.models.NniBmpPatchProperties + :ivar prefix_limits: OptionB Layer3 prefix limit configuration. + :vartype prefix_limits: + list[~azure.mgmt.managednetworkfabric.models.OptionBLayer3PrefixLimitPatchProperties] + """ + + peer_asn: Optional[int] = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """ASN of PE devices for CE/PE connectivity.Example : 28.""" + vlan_id: Optional[int] = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """VLAN for CE/PE Layer 3 connectivity.Example : 501.""" + fabric_asn: Optional[int] = rest_field(name="fabricASN", visibility=["read"]) + """ASN of CE devices for CE/PE connectivity.""" + pe_loopback_ip_address: Optional[list[str]] = rest_field( + name="peLoopbackIpAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """Provider Edge (PE) Loopback IP Address.""" + bmp_configuration: Optional["_models.NniBmpPatchProperties"] = rest_field( + name="bmpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BGP Monitoring Protocol (BMP) Configuration.""" + prefix_limits: Optional[list["_models.OptionBLayer3PrefixLimitPatchProperties"]] = rest_field( + name="prefixLimits", visibility=["read", "create", "update", "delete", "query"] + ) + """OptionB Layer3 prefix limit configuration.""" + + @overload + def __init__( + self, + *, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + peer_asn: Optional[int] = None, + vlan_id: Optional[int] = None, + pe_loopback_ip_address: Optional[list[str]] = None, + bmp_configuration: Optional["_models.NniBmpPatchProperties"] = None, + prefix_limits: Optional[list["_models.OptionBLayer3PrefixLimitPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OptionBLayer3PrefixLimitPatchProperties(_Model): + """OptionB Layer3 prefix limit patch properties. + + :ivar maximum_routes: Maximum number of routes allowed. + :vartype maximum_routes: int + """ + + maximum_routes: Optional[int] = rest_field( + name="maximumRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of routes allowed.""" + + @overload + def __init__( + self, + *, + maximum_routes: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OptionBLayer3PrefixLimitProperties(_Model): + """OptionB Layer3 prefix limit properties. + + :ivar maximum_routes: Maximum number of routes allowed. + :vartype maximum_routes: int + """ + + maximum_routes: Optional[int] = rest_field( + name="maximumRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of routes allowed.""" + + @overload + def __init__( + self, + *, + maximum_routes: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PoliceRateConfigurationProperties(_Model): + """Police rate configuration properties. + + :ivar bit_rate: Rate limit in bits per second. + :vartype bit_rate: ~azure.mgmt.managednetworkfabric.models.BitRate + :ivar burst_size: Burst size in packets. + :vartype burst_size: ~azure.mgmt.managednetworkfabric.models.BurstSize + """ + + bit_rate: Optional["_models.BitRate"] = rest_field( + name="bitRate", visibility=["read", "create", "update", "delete", "query"] + ) + """Rate limit in bits per second.""" + burst_size: Optional["_models.BurstSize"] = rest_field( + name="burstSize", visibility=["read", "create", "update", "delete", "query"] + ) + """Burst size in packets.""" + + @overload + def __init__( + self, + *, + bit_rate: Optional["_models.BitRate"] = None, + burst_size: Optional["_models.BurstSize"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortGroupPatchProperties(_Model): + """Port Group Properties. + + :ivar name: The name of the port group. + :vartype name: str + :ivar ports: List of the ports that need to be matched. + :vartype ports: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the port group.""" + ports: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of the ports that need to be matched.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + ports: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PortGroupProperties(_Model): + """Port Group properties. + + :ivar name: The name of the port group. + :vartype name: str + :ivar ports: List of the ports that need to be matched. + :vartype ports: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the port group.""" + ports: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of the ports that need to be matched.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + ports: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrefixLimitPatchProperties(_Model): + """Prefix Limit Patch properties. + + :ivar maximum_routes: Maximum routes allowed. + :vartype maximum_routes: int + :ivar threshold: Limit at which route prefixes a warning is generate. + :vartype threshold: int + :ivar idle_time_expiry: Idle time expiry in seconds. + :vartype idle_time_expiry: int + """ + + maximum_routes: Optional[int] = rest_field( + name="maximumRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum routes allowed.""" + threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Limit at which route prefixes a warning is generate.""" + idle_time_expiry: Optional[int] = rest_field( + name="idleTimeExpiry", visibility=["read", "create", "update", "delete", "query"] + ) + """Idle time expiry in seconds.""" + + @overload + def __init__( + self, + *, + maximum_routes: Optional[int] = None, + threshold: Optional[int] = None, + idle_time_expiry: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrefixLimitProperties(_Model): + """Prefix Limit properties. + + :ivar maximum_routes: Maximum routes allowed. + :vartype maximum_routes: int + :ivar threshold: Limit at which route prefixes a warning is generate. + :vartype threshold: int + :ivar idle_time_expiry: Idle Time Expiry in seconds, default is 60. + :vartype idle_time_expiry: int + """ + + maximum_routes: Optional[int] = rest_field( + name="maximumRoutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum routes allowed.""" + threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Limit at which route prefixes a warning is generate.""" + idle_time_expiry: Optional[int] = rest_field( + name="idleTimeExpiry", visibility=["read", "create", "update", "delete", "query"] + ) + """Idle Time Expiry in seconds, default is 60.""" + + @overload + def __init__( + self, + *, + maximum_routes: Optional[int] = None, + threshold: Optional[int] = None, + idle_time_expiry: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QosPatchProperties(_Model): + """NetworkFabric QoS Patch Properties. + + :ivar qos_configuration_state: QoS configuration state. Default is Disabled. Known values are: + "Disabled" and "Enabled". + :vartype qos_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.QosConfigurationState + """ + + qos_configuration_state: Optional[Union[str, "_models.QosConfigurationState"]] = rest_field( + name="qosConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """QoS configuration state. Default is Disabled. Known values are: \"Disabled\" and \"Enabled\".""" + + @overload + def __init__( + self, + *, + qos_configuration_state: Optional[Union[str, "_models.QosConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QosProperties(_Model): + """NetworkFabric QoS Properties. + + :ivar qos_configuration_state: QoS configuration state. Default is Disabled. Known values are: + "Disabled" and "Enabled". + :vartype qos_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.QosConfigurationState + """ + + qos_configuration_state: Optional[Union[str, "_models.QosConfigurationState"]] = rest_field( + name="qosConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """QoS configuration state. Default is Disabled. Known values are: \"Disabled\" and \"Enabled\".""" + + @overload + def __init__( + self, + *, + qos_configuration_state: Optional[Union[str, "_models.QosConfigurationState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RebootProperties(_Model): + """Reboot properties. + + :ivar reboot_type: Type of reboot to be performed. Example: GracefulRebootWithZTP. Known values + are: "GracefulRebootWithZTP", "GracefulRebootWithoutZTP", "UngracefulRebootWithZTP", and + "UngracefulRebootWithoutZTP". + :vartype reboot_type: str or ~azure.mgmt.managednetworkfabric.models.RebootType + """ + + reboot_type: Optional[Union[str, "_models.RebootType"]] = rest_field( + name="rebootType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of reboot to be performed. Example: GracefulRebootWithZTP. Known values are: + \"GracefulRebootWithZTP\", \"GracefulRebootWithoutZTP\", \"UngracefulRebootWithZTP\", and + \"UngracefulRebootWithoutZTP\".""" + + @overload + def __init__( + self, + *, + reboot_type: Optional[Union[str, "_models.RebootType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePolicy(TrackedResource): + """The RoutePolicy resource definition. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The RoutePolicy properties. Required. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.RoutePolicyProperties + """ + + properties: "_models.RoutePolicyProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The RoutePolicy properties. Required.""" + + __flattened_items = [ + "annotation", + "default_action", + "statements", + "network_fabric_id", + "address_family_type", + "last_operation", + "configuration_state", + "provisioning_state", + "administrative_state", + ] + + @overload + def __init__( + self, + *, + location: str, + properties: "_models.RoutePolicyProperties", + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RoutePolicyPatch(TagsUpdate): + """The Route Policy patch resource definition. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: The RoutePolicy patchable properties. + :vartype properties: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatchableProperties + """ + + properties: Optional["_models.RoutePolicyPatchableProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The RoutePolicy patchable properties.""" + + __flattened_items = ["default_action", "statements"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.RoutePolicyPatchableProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class RoutePolicyPatchableProperties(_Model): + """Route Policy patchable properties. + + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar statements: Route Policy statements. + :vartype statements: + list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementPatchProperties] + """ + + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = rest_field( + name="defaultAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + Known values are: \"Permit\" and \"Deny\".""" + statements: Optional[list["_models.RoutePolicyStatementPatchProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Route Policy statements.""" + + @overload + def __init__( + self, + *, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + statements: Optional[list["_models.RoutePolicyStatementPatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePolicyProperties(_Model): + """RoutePolicyProperties defines the resource properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar default_action: Default action that needs to be applied when no condition is matched. + Example: Permit | Deny. Known values are: "Permit" and "Deny". + :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes + :ivar statements: Route Policy statements. Required. + :vartype statements: + list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] + :ivar network_fabric_id: Arm Resource ID of Network Fabric. Required. + :vartype network_fabric_id: str + :ivar address_family_type: AddressFamilyType. This parameter decides whether the given ipv4 or + ipv6 route policy. Known values are: "IPv4" and "IPv6". + :vartype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType + :ivar last_operation: Details of the last operation performed on the resource. + :vartype last_operation: ~azure.mgmt.managednetworkfabric.models.LastOperationProperties + :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", + "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + """ + + annotation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Switch configuration description.""" + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = rest_field( + name="defaultAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + Known values are: \"Permit\" and \"Deny\".""" + statements: list["_models.RoutePolicyStatementProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Route Policy statements. Required.""" + network_fabric_id: str = rest_field( + name="networkFabricId", visibility=["read", "create", "update", "delete", "query"] + ) + """Arm Resource ID of Network Fabric. Required.""" + address_family_type: Optional[Union[str, "_models.AddressFamilyType"]] = rest_field( + name="addressFamilyType", visibility=["read", "create", "update", "delete", "query"] + ) + """AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. Known + values are: \"IPv4\" and \"IPv6\".""" + last_operation: Optional["_models.LastOperationProperties"] = rest_field(name="lastOperation", visibility=["read"]) + """Details of the last operation performed on the resource.""" + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Configuration state of the resource. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Provisioning state of the resource. Known values are: \"Accepted\", \"Succeeded\", + \"Updating\", \"Deleting\", \"Failed\", and \"Canceled\".""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + + @overload + def __init__( + self, + *, + statements: list["_models.RoutePolicyStatementProperties"], + network_fabric_id: str, + annotation: Optional[str] = None, + default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, + address_family_type: Optional[Union[str, "_models.AddressFamilyType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePolicyStatementPatchProperties(AnnotationResource): + """Route Policy Statement properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar sequence_number: Sequence to insert to/delete from existing route. Required. + :vartype sequence_number: int + :ivar condition: Route policy condition properties. Required. + :vartype condition: ~azure.mgmt.managednetworkfabric.models.StatementConditionPatchProperties + :ivar action: Route policy action properties. Required. + :vartype action: ~azure.mgmt.managednetworkfabric.models.StatementActionPatchProperties + """ + + sequence_number: int = rest_field(name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"]) + """Sequence to insert to/delete from existing route. Required.""" + condition: "_models.StatementConditionPatchProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Route policy condition properties. Required.""" + action: "_models.StatementActionPatchProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Route policy action properties. Required.""" + + @overload + def __init__( + self, + *, + sequence_number: int, + condition: "_models.StatementConditionPatchProperties", + action: "_models.StatementActionPatchProperties", + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePolicyStatementProperties(AnnotationResource): + """Route Policy Statement properties. + + :ivar annotation: Switch configuration description. + :vartype annotation: str + :ivar sequence_number: Sequence to insert to/delete from existing route. Required. + :vartype sequence_number: int + :ivar condition: Route policy condition properties. Required. + :vartype condition: ~azure.mgmt.managednetworkfabric.models.StatementConditionProperties + :ivar action: Route policy action properties. Required. + :vartype action: ~azure.mgmt.managednetworkfabric.models.StatementActionProperties + """ + + sequence_number: int = rest_field(name="sequenceNumber", visibility=["read", "create", "update", "delete", "query"]) + """Sequence to insert to/delete from existing route. Required.""" + condition: "_models.StatementConditionProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Route policy condition properties. Required.""" + action: "_models.StatementActionProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Route policy action properties. Required.""" + + @overload + def __init__( + self, + *, + sequence_number: int, + condition: "_models.StatementConditionProperties", + action: "_models.StatementActionProperties", + annotation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePrefixLimitPatchProperties(_Model): + """VRP Limit patch configuration. + + :ivar hard_limit: Hard limit for the routes. + :vartype hard_limit: int + :ivar threshold: Threshold for the routes. + :vartype threshold: int + """ + + hard_limit: Optional[int] = rest_field(name="hardLimit", visibility=["read", "create", "update", "delete", "query"]) + """Hard limit for the routes.""" + threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Threshold for the routes.""" + + @overload + def __init__( + self, + *, + hard_limit: Optional[int] = None, + threshold: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutePrefixLimitProperties(_Model): + """Layer3 Route prefix limit configuration. + + :ivar hard_limit: Hard limit for the routes. + :vartype hard_limit: int + :ivar threshold: Threshold for the routes. + :vartype threshold: int + """ + + hard_limit: Optional[int] = rest_field(name="hardLimit", visibility=["read", "create", "update", "delete", "query"]) + """Hard limit for the routes.""" + threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Threshold for the routes.""" + + @overload + def __init__( + self, + *, + hard_limit: Optional[int] = None, + threshold: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteTargetInformation(_Model): + """Route Target Configuration. + + :ivar import_ipv4_route_targets: Route Targets to be applied for incoming routes into CE. + :vartype import_ipv4_route_targets: list[str] + :ivar import_ipv6_route_targets: Route Targets to be applied for incoming routes from CE. + :vartype import_ipv6_route_targets: list[str] + :ivar export_ipv4_route_targets: Route Targets to be applied for outgoing routes into CE. + :vartype export_ipv4_route_targets: list[str] + :ivar export_ipv6_route_targets: Route Targets to be applied for outgoing routes from CE. + :vartype export_ipv6_route_targets: list[str] + """ + + import_ipv4_route_targets: Optional[list[str]] = rest_field( + name="importIpv4RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes into CE.""" + import_ipv6_route_targets: Optional[list[str]] = rest_field( + name="importIpv6RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes from CE.""" + export_ipv4_route_targets: Optional[list[str]] = rest_field( + name="exportIpv4RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes into CE.""" + export_ipv6_route_targets: Optional[list[str]] = rest_field( + name="exportIpv6RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes from CE.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_targets: Optional[list[str]] = None, + import_ipv6_route_targets: Optional[list[str]] = None, + export_ipv4_route_targets: Optional[list[str]] = None, + export_ipv6_route_targets: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteTargetPatchInformation(_Model): + """Route Target Configuration. + + :ivar import_ipv4_route_targets: Route Targets to be applied for incoming routes into CE. + :vartype import_ipv4_route_targets: list[str] + :ivar import_ipv6_route_targets: Route Targets to be applied for incoming routes from CE. + :vartype import_ipv6_route_targets: list[str] + :ivar export_ipv4_route_targets: Route Targets to be applied for outgoing routes into CE. + :vartype export_ipv4_route_targets: list[str] + :ivar export_ipv6_route_targets: Route Targets to be applied for outgoing routes from CE. + :vartype export_ipv6_route_targets: list[str] + """ + + import_ipv4_route_targets: Optional[list[str]] = rest_field( + name="importIpv4RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes into CE.""" + import_ipv6_route_targets: Optional[list[str]] = rest_field( + name="importIpv6RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes from CE.""" + export_ipv4_route_targets: Optional[list[str]] = rest_field( + name="exportIpv4RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes into CE.""" + export_ipv6_route_targets: Optional[list[str]] = rest_field( + name="exportIpv6RouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes from CE.""" + + @overload + def __init__( + self, + *, + import_ipv4_route_targets: Optional[list[str]] = None, + import_ipv6_route_targets: Optional[list[str]] = None, + export_ipv4_route_targets: Optional[list[str]] = None, + export_ipv6_route_targets: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RuleProperties(_Model): + """Rules for the InternetGateways. + + :ivar action: Specify action. Required. Known values are: "Allow" and "Deny". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.Action + :ivar address_list: List of Addresses to be allowed or denied. + :vartype address_list: list[str] + :ivar condition: Specify rule condition. Known values are: "And" and "Or". + :vartype condition: str or ~azure.mgmt.managednetworkfabric.models.RuleCondition + :ivar destination_address_list: List of Addresses to be allowed or denied. + :vartype destination_address_list: list[str] + :ivar source_address_list: List of source IPv4 and IPv6 address to be allowed or denied. + :vartype source_address_list: list[str] + :ivar header_address_list: List of header Name and source addresses associated with the header. + :vartype header_address_list: + list[~azure.mgmt.managednetworkfabric.models.HeaderAddressProperties] + """ + + action: Union[str, "_models.Action"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specify action. Required. Known values are: \"Allow\" and \"Deny\".""" + address_list: Optional[list[str]] = rest_field( + name="addressList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Addresses to be allowed or denied.""" + condition: Optional[Union[str, "_models.RuleCondition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specify rule condition. Known values are: \"And\" and \"Or\".""" + destination_address_list: Optional[list[str]] = rest_field( + name="destinationAddressList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Addresses to be allowed or denied.""" + source_address_list: Optional[list[str]] = rest_field( + name="sourceAddressList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of source IPv4 and IPv6 address to be allowed or denied.""" + header_address_list: Optional[list["_models.HeaderAddressProperties"]] = rest_field( + name="headerAddressList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of header Name and source addresses associated with the header.""" + + @overload + def __init__( + self, + *, + action: Union[str, "_models.Action"], + address_list: Optional[list[str]] = None, + condition: Optional[Union[str, "_models.RuleCondition"]] = None, + destination_address_list: Optional[list[str]] = None, + source_address_list: Optional[list[str]] = None, + header_address_list: Optional[list["_models.HeaderAddressProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecretArchiveReference(_Model): + """A reference to a version of a secret in a key vault. + + :ivar key_vault_uri: A Uniform Resource Identifier (URI) for the secret in the key vault. + :vartype key_vault_uri: str + :ivar key_vault_id: The resource ID of the key vault containing the secret. + :vartype key_vault_id: str + :ivar secret_name: The name of the secret in the key vault. + :vartype secret_name: str + :ivar secret_version: The version of the secret in the key vault. + :vartype secret_version: str + """ + + key_vault_uri: Optional[str] = rest_field(name="keyVaultUri", visibility=["read"]) + """A Uniform Resource Identifier (URI) for the secret in the key vault.""" + key_vault_id: Optional[str] = rest_field(name="keyVaultId", visibility=["read"]) + """The resource ID of the key vault containing the secret.""" + secret_name: Optional[str] = rest_field(name="secretName", visibility=["read"]) + """The name of the secret in the key vault.""" + secret_version: Optional[str] = rest_field(name="secretVersion", visibility=["read"]) + """The version of the secret in the key vault.""" + + +class SecretRotationStatus(_Model): + """Status of a secret rotation for a device (Network Device or Terminal Server). + + :ivar last_rotation_time: The date and time when the secret was last changed. + :vartype last_rotation_time: ~datetime.datetime + :ivar synchronization_status: Whether the device has been configured with the latest version of + the secret. Known values are: "InSync", "Synchronizing", and "OutOfSync". + :vartype synchronization_status: str or + ~azure.mgmt.managednetworkfabric.models.SynchronizationStatus + :ivar secret_archive_reference: Reference to the currently configured version of the secret in + a key vault. + :vartype secret_archive_reference: + ~azure.mgmt.managednetworkfabric.models.SecretArchiveReference + :ivar secret_type: Identifies the secret according to its purpose. + :vartype secret_type: str + """ + + last_rotation_time: Optional[datetime.datetime] = rest_field( + name="lastRotationTime", visibility=["read"], format="rfc3339" + ) + """The date and time when the secret was last changed.""" + synchronization_status: Optional[Union[str, "_models.SynchronizationStatus"]] = rest_field( + name="synchronizationStatus", visibility=["read"] + ) + """Whether the device has been configured with the latest version of the secret. Known values are: + \"InSync\", \"Synchronizing\", and \"OutOfSync\".""" + secret_archive_reference: Optional["_models.SecretArchiveReference"] = rest_field( + name="secretArchiveReference", visibility=["read"] + ) + """Reference to the currently configured version of the secret in a key vault.""" + secret_type: Optional[str] = rest_field(name="secretType", visibility=["read"]) + """Identifies the secret according to its purpose.""" + + +class SecretRotationSummary(_Model): + """Overview of secret rotation for the Network Fabric. + + :ivar active_password_set_count: The number of active password sets configured on the devices. + :vartype active_password_set_count: int + """ + + active_password_set_count: Optional[int] = rest_field(name="activePasswordSetCount", visibility=["read"]) + """The number of active password sets configured on the devices.""" + + +class StatementActionPatchProperties(_Model): + """Route policy action properties. + + :ivar local_preference: Local Preference of the route policy. + :vartype local_preference: int + :ivar action_type: Action type. Example: Permit | Deny | Continue. Required. Known values are: + "Permit", "Deny", and "Continue". + :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType + :ivar ip_community_properties: IP Community Properties. + :vartype ip_community_properties: + ~azure.mgmt.managednetworkfabric.models.ActionIpCommunityPatchProperties + :ivar ip_extended_community_properties: IP Extended Community Properties. + :vartype ip_extended_community_properties: + ~azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityPatchProperties + """ + + local_preference: Optional[int] = rest_field( + name="localPreference", visibility=["read", "create", "update", "delete", "query"] + ) + """Local Preference of the route policy.""" + action_type: Union[str, "_models.RoutePolicyActionType"] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """Action type. Example: Permit | Deny | Continue. Required. Known values are: \"Permit\", + \"Deny\", and \"Continue\".""" + ip_community_properties: Optional["_models.ActionIpCommunityPatchProperties"] = rest_field( + name="ipCommunityProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Community Properties.""" + ip_extended_community_properties: Optional["_models.ActionIpExtendedCommunityPatchProperties"] = rest_field( + name="ipExtendedCommunityProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Extended Community Properties.""" + + @overload + def __init__( + self, + *, + action_type: Union[str, "_models.RoutePolicyActionType"], + local_preference: Optional[int] = None, + ip_community_properties: Optional["_models.ActionIpCommunityPatchProperties"] = None, + ip_extended_community_properties: Optional["_models.ActionIpExtendedCommunityPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StatementActionProperties(_Model): + """Route policy action properties. + + :ivar local_preference: Local Preference of the route policy. + :vartype local_preference: int + :ivar action_type: Action type. Example: Permit | Deny | Continue. Required. Known values are: + "Permit", "Deny", and "Continue". + :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType + :ivar ip_community_properties: IP Community Properties. + :vartype ip_community_properties: + ~azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties + :ivar ip_extended_community_properties: IP Extended Community Properties. + :vartype ip_extended_community_properties: + ~azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties + """ + + local_preference: Optional[int] = rest_field( + name="localPreference", visibility=["read", "create", "update", "delete", "query"] + ) + """Local Preference of the route policy.""" + action_type: Union[str, "_models.RoutePolicyActionType"] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """Action type. Example: Permit | Deny | Continue. Required. Known values are: \"Permit\", + \"Deny\", and \"Continue\".""" + ip_community_properties: Optional["_models.ActionIpCommunityProperties"] = rest_field( + name="ipCommunityProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Community Properties.""" + ip_extended_community_properties: Optional["_models.ActionIpExtendedCommunityProperties"] = rest_field( + name="ipExtendedCommunityProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Extended Community Properties.""" + + @overload + def __init__( + self, + *, + action_type: Union[str, "_models.RoutePolicyActionType"], + local_preference: Optional[int] = None, + ip_community_properties: Optional["_models.ActionIpCommunityProperties"] = None, + ip_extended_community_properties: Optional["_models.ActionIpExtendedCommunityProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StatementConditionPatchProperties(_Model): + """Route policy statement condition properties. + + :ivar ip_community_ids: List of IP Community resource IDs. + :vartype ip_community_ids: list[str] + :ivar ip_extended_community_ids: List of IP Extended Community resource IDs. + :vartype ip_extended_community_ids: list[str] + :ivar type: Type of the condition used. Known values are: "Or" and "And". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType + :ivar ip_prefix_id: Arm Resource Id of IpPrefix. + :vartype ip_prefix_id: str + """ + + ip_community_ids: Optional[list[str]] = rest_field( + name="ipCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community resource IDs.""" + ip_extended_community_ids: Optional[list[str]] = rest_field( + name="ipExtendedCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community resource IDs.""" + type: Optional[Union[str, "_models.RoutePolicyConditionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the condition used. Known values are: \"Or\" and \"And\".""" + ip_prefix_id: Optional[str] = rest_field( + name="ipPrefixId", visibility=["read", "create", "update", "delete", "query"] + ) + """Arm Resource Id of IpPrefix.""" + + @overload + def __init__( + self, + *, + ip_community_ids: Optional[list[str]] = None, + ip_extended_community_ids: Optional[list[str]] = None, + type: Optional[Union[str, "_models.RoutePolicyConditionType"]] = None, + ip_prefix_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StatementConditionProperties(_Model): + """Route policy statement condition properties. + + :ivar ip_community_ids: List of IP Community resource IDs. + :vartype ip_community_ids: list[str] + :ivar ip_extended_community_ids: List of IP Extended Community resource IDs. + :vartype ip_extended_community_ids: list[str] + :ivar type: Type of the condition used. Known values are: "Or" and "And". + :vartype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType + :ivar ip_prefix_id: Arm Resource Id of IpPrefix. + :vartype ip_prefix_id: str + """ + + ip_community_ids: Optional[list[str]] = rest_field( + name="ipCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Community resource IDs.""" + ip_extended_community_ids: Optional[list[str]] = rest_field( + name="ipExtendedCommunityIds", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Extended Community resource IDs.""" + type: Optional[Union[str, "_models.RoutePolicyConditionType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the condition used. Known values are: \"Or\" and \"And\".""" + ip_prefix_id: Optional[str] = rest_field( + name="ipPrefixId", visibility=["read", "create", "update", "delete", "query"] + ) + """Arm Resource Id of IpPrefix.""" + + @overload + def __init__( + self, + *, + ip_community_ids: Optional[list[str]] = None, + ip_extended_community_ids: Optional[list[str]] = None, + type: Optional[Union[str, "_models.RoutePolicyConditionType"]] = None, + ip_prefix_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRouteConfiguration(_Model): + """Static Route Configuration properties. + + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] + :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and + "NPB". + :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension + """ + + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + extension: Optional[Union[str, "_models.Extension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Extension. Example: NoExtension | NPB. Known values are: \"NoExtension\" and \"NPB\".""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, + extension: Optional[Union[str, "_models.Extension"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRoutePatchConfiguration(_Model): + """Static Route Configuration properties. + + :ivar bfd_configuration: BFD configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + :ivar ipv4_routes: List of IPv4 Routes. + :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + :ivar ipv6_routes: List of IPv6 Routes. + :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRoutePatchProperties] + """ + + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD configuration properties.""" + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv4Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv4 Routes.""" + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = rest_field( + name="ipv6Routes", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IPv6 Routes.""" + + @overload + def __init__( + self, + *, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ipv4_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ipv6_routes: Optional[list["_models.StaticRoutePatchProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRoutePatchProperties(_Model): + """Route Properties. + + :ivar prefix: Prefix of the route. Required. + :vartype prefix: str + :ivar next_hop: List of next hop addresses. Required. + :vartype next_hop: list[str] + """ + + prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Prefix of the route. Required.""" + next_hop: list[str] = rest_field(name="nextHop", visibility=["read", "create", "update", "delete", "query"]) + """List of next hop addresses. Required.""" + + @overload + def __init__( + self, + *, + prefix: str, + next_hop: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRoutePolicy(_Model): + """Static Route - route policy properties. + + :ivar export_route_policy: Array of ARM Resource ID of the RoutePolicies. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy + """ + + export_route_policy: Optional["_models.L3ExportRoutePolicy"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of ARM Resource ID of the RoutePolicies.""" + + @overload + def __init__( + self, + *, + export_route_policy: Optional["_models.L3ExportRoutePolicy"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRoutePolicyPatch(_Model): + """Static Route - route policy properties. + + :ivar export_route_policy: Array of ARM Resource ID of the RoutePolicies. + :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicyPatch + """ + + export_route_policy: Optional["_models.L3ExportRoutePolicyPatch"] = rest_field( + name="exportRoutePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of ARM Resource ID of the RoutePolicies.""" + + @overload + def __init__( + self, + *, + export_route_policy: Optional["_models.L3ExportRoutePolicyPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StaticRouteProperties(_Model): + """Route Properties. + + :ivar prefix: Prefix of the route. Required. + :vartype prefix: str + :ivar next_hop: List of next hop addresses. Required. + :vartype next_hop: list[str] + """ + + prefix: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Prefix of the route. Required.""" + next_hop: list[str] = rest_field(name="nextHop", visibility=["read", "create", "update", "delete", "query"]) + """List of next hop addresses. Required.""" + + @overload + def __init__( + self, + *, + prefix: str, + next_hop: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StationConnectionPatchProperties(_Model): + """Station Connection PATCH Properties. + + :ivar keepalive_idle_time: Connection keepalive idle time in seconds. + :vartype keepalive_idle_time: int + :ivar probe_interval: Probe interval in seconds, default value is 60. + :vartype probe_interval: int + :ivar probe_count: Probe count, default value is 10. + :vartype probe_count: int + """ + + keepalive_idle_time: Optional[int] = rest_field( + name="keepaliveIdleTime", visibility=["read", "create", "update", "delete", "query"] + ) + """Connection keepalive idle time in seconds.""" + probe_interval: Optional[int] = rest_field( + name="probeInterval", visibility=["read", "create", "update", "delete", "query"] + ) + """Probe interval in seconds, default value is 60.""" + probe_count: Optional[int] = rest_field( + name="probeCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Probe count, default value is 10.""" + + @overload + def __init__( + self, + *, + keepalive_idle_time: Optional[int] = None, + probe_interval: Optional[int] = None, + probe_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StationConnectionProperties(_Model): + """Station Connection Properties. + + :ivar keepalive_idle_time: Connection keepalive idle time in seconds. + :vartype keepalive_idle_time: int + :ivar probe_interval: Probe interval in seconds, default value is 60. + :vartype probe_interval: int + :ivar probe_count: Probe count, default value is 10. + :vartype probe_count: int + """ + + keepalive_idle_time: Optional[int] = rest_field( + name="keepaliveIdleTime", visibility=["read", "create", "update", "delete", "query"] + ) + """Connection keepalive idle time in seconds.""" + probe_interval: Optional[int] = rest_field( + name="probeInterval", visibility=["read", "create", "update", "delete", "query"] + ) + """Probe interval in seconds, default value is 60.""" + probe_count: Optional[int] = rest_field( + name="probeCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Probe count, default value is 10.""" + + @overload + def __init__( + self, + *, + keepalive_idle_time: Optional[int] = None, + probe_interval: Optional[int] = None, + probe_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StorageAccountConfiguration(_Model): + """Storage account configuration. + + :ivar storage_account_id: Network Fabric storage account resource identifier. + :vartype storage_account_id: str + :ivar storage_account_identity: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype storage_account_identity: ~azure.mgmt.managednetworkfabric.models.IdentitySelector + """ + + storage_account_id: Optional[str] = rest_field( + name="storageAccountId", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabric storage account resource identifier.""" + storage_account_identity: Optional["_models.IdentitySelector"] = rest_field( + name="storageAccountIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + + @overload + def __init__( + self, + *, + storage_account_id: Optional[str] = None, + storage_account_identity: Optional["_models.IdentitySelector"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StorageAccountPatchConfiguration(_Model): + """Storage account configuration. + + :ivar storage_account_id: Network Fabric storage account resource identifier. + :vartype storage_account_id: str + :ivar storage_account_identity: The selection of the managed identity to use with this storage + account. The identity type must be either system assigned or user assigned. + :vartype storage_account_identity: + ~azure.mgmt.managednetworkfabric.models.IdentitySelectorPatch + """ + + storage_account_id: Optional[str] = rest_field( + name="storageAccountId", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Fabric storage account resource identifier.""" + storage_account_identity: Optional["_models.IdentitySelectorPatch"] = rest_field( + name="storageAccountIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The selection of the managed identity to use with this storage account. The identity type must + be either system assigned or user assigned.""" + + @overload + def __init__( + self, + *, + storage_account_id: Optional[str] = None, + storage_account_identity: Optional["_models.IdentitySelectorPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SupportedConnectorProperties(_Model): + """Supported connector properties. + + :ivar connector_type: Type of connector used. Example: Optical. + :vartype connector_type: str + :ivar max_speed_in_mbps: Maximum speed of the connector in Mbps. + :vartype max_speed_in_mbps: int + """ + + connector_type: Optional[str] = rest_field( + name="connectorType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of connector used. Example: Optical.""" + max_speed_in_mbps: Optional[int] = rest_field( + name="maxSpeedInMbps", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum speed of the connector in Mbps.""" + + @overload + def __init__( + self, + *, + connector_type: Optional[str] = None, + max_speed_in_mbps: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SupportedVersionProperties(_Model): + """Supported version details of the network device. + + :ivar version: Operating system and firmware combined versions. + :vartype version: str + :ivar vendor_os_version: Operating system version. + :vartype vendor_os_version: str + :ivar vendor_firmware_version: Firmware version. + :vartype vendor_firmware_version: str + :ivar is_default: If true newly provisioned Fabric will use this device version by default to + bootstrap the network devices for the first time. Known values are: "True" and "False". + :vartype is_default: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty + """ + + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operating system and firmware combined versions.""" + vendor_os_version: Optional[str] = rest_field( + name="vendorOsVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Operating system version.""" + vendor_firmware_version: Optional[str] = rest_field( + name="vendorFirmwareVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Firmware version.""" + is_default: Optional[Union[str, "_models.BooleanEnumProperty"]] = rest_field( + name="isDefault", visibility=["read", "create", "update", "delete", "query"] + ) + """If true newly provisioned Fabric will use this device version by default to bootstrap the + network devices for the first time. Known values are: \"True\" and \"False\".""" + + @overload + def __init__( + self, + *, + version: Optional[str] = None, + vendor_os_version: Optional[str] = None, + vendor_firmware_version: Optional[str] = None, + is_default: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TerminalServerConfiguration(_Model): + """Network and credentials configuration currently applied to terminal server. + + :ivar username: Username for the terminal server connection. Required. + :vartype username: str + :ivar password: Password for the terminal server connection. Required. + :vartype password: str + :ivar serial_number: Serial Number of Terminal server. + :vartype serial_number: str + :ivar primary_ipv4_prefix: IPv4 Address Prefix. Required. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. Required. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar network_device_id: ARM Resource ID used for the NetworkDevice. + :vartype network_device_id: str + :ivar secret_rotation_status: Secret rotation status for the terminal server's secrets. + :vartype secret_rotation_status: + list[~azure.mgmt.managednetworkfabric.models.SecretRotationStatus] + """ + + username: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Username for the terminal server connection. Required.""" + password: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Password for the terminal server connection. Required.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial Number of Terminal server.""" + primary_ipv4_prefix: str = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix. Required.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: str = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix. Required.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + network_device_id: Optional[str] = rest_field(name="networkDeviceId", visibility=["read"]) + """ARM Resource ID used for the NetworkDevice.""" + secret_rotation_status: Optional[list["_models.SecretRotationStatus"]] = rest_field( + name="secretRotationStatus", visibility=["read"] + ) + """Secret rotation status for the terminal server's secrets.""" + + @overload + def __init__( + self, + *, + username: str, + password: str, + primary_ipv4_prefix: str, + secondary_ipv4_prefix: str, + serial_number: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TerminalServerPatchConfiguration(_Model): + """Network and credentials configuration already applied to terminal server. + + :ivar username: Username for the terminal server connection. + :vartype username: str + :ivar password: Password for the terminal server connection. + :vartype password: str + :ivar serial_number: Serial Number of Terminal server. + :vartype serial_number: str + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + """ + + username: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Username for the terminal server connection.""" + password: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Password for the terminal server connection.""" + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial Number of Terminal server.""" + primary_ipv4_prefix: Optional[str] = rest_field( + name="primaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv4 Address Prefix.""" + primary_ipv6_prefix: Optional[str] = rest_field( + name="primaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """IPv6 Address Prefix.""" + secondary_ipv4_prefix: Optional[str] = rest_field( + name="secondaryIpv4Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv4 Address Prefix.""" + secondary_ipv6_prefix: Optional[str] = rest_field( + name="secondaryIpv6Prefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Secondary IPv6 Address Prefix.""" + + @overload + def __init__( + self, + *, + username: Optional[str] = None, + password: Optional[str] = None, + serial_number: Optional[str] = None, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UniqueRouteDistinguisherPatchProperties(_Model): + """Unique Route Distinguisher configuration properties. + + :ivar unique_rd_configuration_state: Unique Route Distinguisher configuration state. Default is + Enabled. Known values are: "Enabled" and "Disabled". + :vartype unique_rd_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState + :ivar nni_derived_unique_rd_configuration_state: NNI derived unique Route Distinguisher state. + Default is Disabled. Known values are: "Enabled" and "Disabled". + :vartype nni_derived_unique_rd_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState + """ + + unique_rd_configuration_state: Optional[Union[str, "_models.UniqueRouteDistinguisherConfigurationState"]] = ( + rest_field(name="uniqueRdConfigurationState", visibility=["read", "create", "update", "delete", "query"]) + ) + """Unique Route Distinguisher configuration state. Default is Enabled. Known values are: + \"Enabled\" and \"Disabled\".""" + nni_derived_unique_rd_configuration_state: Optional[ + Union[str, "_models.NNIDerivedUniqueRouteDistinguisherConfigurationState"] + ] = rest_field( + name="nniDerivedUniqueRdConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """NNI derived unique Route Distinguisher state. Default is Disabled. Known values are: + \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + unique_rd_configuration_state: Optional[ + Union[str, "_models.UniqueRouteDistinguisherConfigurationState"] + ] = None, + nni_derived_unique_rd_configuration_state: Optional[ + Union[str, "_models.NNIDerivedUniqueRouteDistinguisherConfigurationState"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UniqueRouteDistinguisherProperties(_Model): + """Unique Route Distinguisher properties. + + :ivar unique_rd_configuration_state: Unique Route Distinguisher configuration state. Default is + Enabled. Known values are: "Enabled" and "Disabled". + :vartype unique_rd_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.UniqueRouteDistinguisherConfigurationState + :ivar unique_rds: List of Unique Route Distinguisher addresses. + :vartype unique_rds: list[str] + :ivar nni_derived_unique_rd_configuration_state: NNI derived unique Route Distinguisher state. + Default is Disabled. Known values are: "Enabled" and "Disabled". + :vartype nni_derived_unique_rd_configuration_state: str or + ~azure.mgmt.managednetworkfabric.models.NNIDerivedUniqueRouteDistinguisherConfigurationState + """ + + unique_rd_configuration_state: Optional[Union[str, "_models.UniqueRouteDistinguisherConfigurationState"]] = ( + rest_field(name="uniqueRdConfigurationState", visibility=["read", "create", "update", "delete", "query"]) + ) + """Unique Route Distinguisher configuration state. Default is Enabled. Known values are: + \"Enabled\" and \"Disabled\".""" + unique_rds: Optional[list[str]] = rest_field(name="uniqueRds", visibility=["read"]) + """List of Unique Route Distinguisher addresses.""" + nni_derived_unique_rd_configuration_state: Optional[ + Union[str, "_models.NNIDerivedUniqueRouteDistinguisherConfigurationState"] + ] = rest_field( + name="nniDerivedUniqueRdConfigurationState", visibility=["read", "create", "update", "delete", "query"] + ) + """NNI derived unique Route Distinguisher state. Default is Disabled. Known values are: + \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + unique_rd_configuration_state: Optional[ + Union[str, "_models.UniqueRouteDistinguisherConfigurationState"] + ] = None, + nni_derived_unique_rd_configuration_state: Optional[ + Union[str, "_models.NNIDerivedUniqueRouteDistinguisherConfigurationState"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateAdministrativeState(EnableDisableOnResources): + """Update administrative state on list of resources. + + :ivar resource_ids: Network Fabrics or Network Rack resource Id. + :vartype resource_ids: list[str] + :ivar state: Administrative state. Known values are: "Enable", "Disable", and + "UnderMaintenance". + :vartype state: str or ~azure.mgmt.managednetworkfabric.models.EnableDisableState + """ + + state: Optional[Union[str, "_models.EnableDisableState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Administrative state. Known values are: \"Enable\", \"Disable\", and \"UnderMaintenance\".""" + + @overload + def __init__( + self, + *, + resource_ids: Optional[list[str]] = None, + state: Optional[Union[str, "_models.EnableDisableState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateAdministrativeStateResponse(_Model): + """Update Administrative State Response. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: Response properties in case of successful administrative state update. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.UpdateAdministrativeStateResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Response properties in case of successful administrative state update.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.UpdateAdministrativeStateResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateAdministrativeStateResponseProperties(_Model): # pylint: disable=name-too-long + """Update Administrative State Response Properties. + + :ivar successful_resources: List of ARM Resource IDs for which the given action applied + successfully. + :vartype successful_resources: list[str] + :ivar failed_resources: List of ARM Resource IDs for which the given action failed to apply. + :vartype failed_resources: list[str] + """ + + successful_resources: Optional[list[str]] = rest_field( + name="successfulResources", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ARM Resource IDs for which the given action applied successfully.""" + failed_resources: Optional[list[str]] = rest_field( + name="failedResources", visibility=["read", "create", "update", "delete", "query"] + ) + """List of ARM Resource IDs for which the given action failed to apply.""" + + @overload + def __init__( + self, + *, + successful_resources: Optional[list[str]] = None, + failed_resources: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateDeviceAdministrativeState(EnableDisableOnResources): + """Update the administrative state on list of resources. + + :ivar resource_ids: Network Fabrics or Network Rack resource Id. + :vartype resource_ids: list[str] + :ivar state: Administrative state. Known values are: "RMA", "UngracefulRMA", "Resync", + "GracefulQuarantine", "UngracefulQuarantine", "Quarantine", "UnderMaintenance", "Enable", and + "Disable". + :vartype state: str or ~azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState + """ + + state: Optional[Union[str, "_models.DeviceAdministrativeState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Administrative state. Known values are: \"RMA\", \"UngracefulRMA\", \"Resync\", + \"GracefulQuarantine\", \"UngracefulQuarantine\", \"Quarantine\", \"UnderMaintenance\", + \"Enable\", and \"Disable\".""" + + @overload + def __init__( + self, + *, + resource_ids: Optional[list[str]] = None, + state: Optional[Union[str, "_models.DeviceAdministrativeState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateVersion(_Model): + """Update version properties. + + :ivar version: Specify the version. + :vartype version: str + """ + + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specify the version.""" + + @overload + def __init__( + self, + *, + version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpgradeNetworkFabricProperties(UpdateVersion): + """Model used for Upgrade Network Fabric Properties. + + :ivar version: Specify the version. + :vartype version: str + :ivar action: Action to be performed while upgrading the fabric. Known values are: "Start" and + "Complete". + :vartype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction + """ + + action: Optional[Union[str, "_models.NetworkFabricUpgradeAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Action to be performed while upgrading the fabric. Known values are: \"Start\" and + \"Complete\".""" + + @overload + def __init__( + self, + *, + version: Optional[str] = None, + action: Optional[Union[str, "_models.NetworkFabricUpgradeAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserAssignedIdentity(_Model): + """User assigned identity properties. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of the assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client ID of the assigned identity.""" + + +class ValidateConfigurationProperties(_Model): + """Validation configuration properties. + + :ivar validate_action: Validate action that to be performed. Known values are: "Cabling", + "Configuration", and "Connectivity". + :vartype validate_action: str or ~azure.mgmt.managednetworkfabric.models.ValidateAction + """ + + validate_action: Optional[Union[str, "_models.ValidateAction"]] = rest_field( + name="validateAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Validate action that to be performed. Known values are: \"Cabling\", \"Configuration\", and + \"Connectivity\".""" + + @overload + def __init__( + self, + *, + validate_action: Optional[Union[str, "_models.ValidateAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ValidateConfigurationResponse(CommonErrorResponse): + """The response of the action validate configuration. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", + "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", + "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", "PendingCommit", and + "PendingAdministrativeUpdate". + :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState + :ivar url: URL for the details of the response. + :vartype url: str + """ + + configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = rest_field( + name="configurationState", visibility=["read"] + ) + """Gets the configuration state. Known values are: \"Succeeded\", \"Failed\", \"Rejected\", + \"Accepted\", \"Provisioned\", \"ErrorProvisioning\", \"Deprovisioning\", \"Deprovisioned\", + \"ErrorDeprovisioning\", \"DeferredControl\", \"Provisioning\", \"PendingCommit\", and + \"PendingAdministrativeUpdate\".""" + url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """URL for the details of the response.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ViewDeviceConfigurationOperationResponse(_Model): + """View Device Configuration Response V2. + + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar properties: View Device Configuration Response Properties. + :vartype properties: + ~azure.mgmt.managednetworkfabric.models.ViewDeviceConfigurationResponseProperties + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + properties: Optional["_models.ViewDeviceConfigurationResponseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """View Device Configuration Response Properties.""" + + @overload + def __init__( + self, + *, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, + properties: Optional["_models.ViewDeviceConfigurationResponseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ViewDeviceConfigurationResponseProperties(_Model): # pylint: disable=name-too-long + """View Device Configuration Response Properties. + + :ivar device_configuration_url: Storage URL to the device configuration file. + :vartype device_configuration_url: str + """ + + device_configuration_url: Optional[str] = rest_field( + name="deviceConfigurationUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Storage URL to the device configuration file.""" + + @overload + def __init__( + self, + *, + device_configuration_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VlanGroupPatchProperties(_Model): + """Vlan group properties. + + :ivar name: Vlan group name. + :vartype name: str + :ivar vlans: List of vlans. + :vartype vlans: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Vlan group name.""" + vlans: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of vlans.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + vlans: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VlanGroupProperties(_Model): + """Vlan group properties. + + :ivar name: Vlan group name. + :vartype name: str + :ivar vlans: List of vlans. + :vartype vlans: list[str] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Vlan group name.""" + vlans: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of vlans.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + vlans: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VlanMatchCondition(_Model): + """The vlan match conditions that need to be matched. + + :ivar vlans: List of vlans that need to be matched. Inputs can be single vlan or the range of + vlans. + :vartype vlans: list[str] + :ivar inner_vlans: List of inner vlans that need to be matched.Inputs can be single vlan or the + range of vlans. + :vartype inner_vlans: list[str] + :ivar vlan_group_names: List of vlan group names that need to be matched. + :vartype vlan_group_names: list[str] + """ + + vlans: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of vlans that need to be matched. Inputs can be single vlan or the range of vlans.""" + inner_vlans: Optional[list[str]] = rest_field( + name="innerVlans", visibility=["read", "create", "update", "delete", "query"] + ) + """List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans.""" + vlan_group_names: Optional[list[str]] = rest_field( + name="vlanGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """List of vlan group names that need to be matched.""" + + @overload + def __init__( + self, + *, + vlans: Optional[list[str]] = None, + inner_vlans: Optional[list[str]] = None, + vlan_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VlanMatchConditionPatch(_Model): + """The vlan match conditions that need to be matched. + + :ivar vlans: List of vlans that need to be matched. Inputs can be single vlan or the range of + vlans. + :vartype vlans: list[str] + :ivar inner_vlans: List of inner vlans that need to be matched.Inputs can be single vlan or the + range of vlans. + :vartype inner_vlans: list[str] + :ivar vlan_group_names: List of vlan group names that need to be matched. + :vartype vlan_group_names: list[str] + """ + + vlans: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of vlans that need to be matched. Inputs can be single vlan or the range of vlans.""" + inner_vlans: Optional[list[str]] = rest_field( + name="innerVlans", visibility=["read", "create", "update", "delete", "query"] + ) + """List of inner vlans that need to be matched.Inputs can be single vlan or the range of vlans.""" + vlan_group_names: Optional[list[str]] = rest_field( + name="vlanGroupNames", visibility=["read", "create", "update", "delete", "query"] + ) + """List of vlan group names that need to be matched.""" + + @overload + def __init__( + self, + *, + vlans: Optional[list[str]] = None, + inner_vlans: Optional[list[str]] = None, + vlan_group_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnConfigurationPatchableProperties(_Model): + """Network and credential configuration currently applied on terminal server. + + :ivar network_to_network_interconnect_id: ARM Resource ID of the Network To Network + Interconnect. + :vartype network_to_network_interconnect_id: str + :ivar peering_option: Peering option list. Known values are: "OptionA" and "OptionB". + :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption + :ivar option_b_properties: option B properties. + :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.VpnOptionBPatchProperties + :ivar option_a_properties: option A properties. + :vartype option_a_properties: ~azure.mgmt.managednetworkfabric.models.VpnOptionAPatchProperties + """ + + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Network To Network Interconnect.""" + peering_option: Optional[Union[str, "_models.PeeringOption"]] = rest_field( + name="peeringOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Peering option list. Known values are: \"OptionA\" and \"OptionB\".""" + option_b_properties: Optional["_models.VpnOptionBPatchProperties"] = rest_field( + name="optionBProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option B properties.""" + option_a_properties: Optional["_models.VpnOptionAPatchProperties"] = rest_field( + name="optionAProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option A properties.""" + + @overload + def __init__( + self, + *, + network_to_network_interconnect_id: Optional[str] = None, + peering_option: Optional[Union[str, "_models.PeeringOption"]] = None, + option_b_properties: Optional["_models.VpnOptionBPatchProperties"] = None, + option_a_properties: Optional["_models.VpnOptionAPatchProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnConfigurationProperties(_Model): + """Network and credential configuration currently applied on terminal server. + + :ivar network_to_network_interconnect_id: ARM Resource ID of the Network To Network + Interconnect. + :vartype network_to_network_interconnect_id: str + :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", + "Disabled", "MAT", "RMA", "UnderMaintenance", and "EnabledDegraded". + :vartype administrative_state: str or + ~azure.mgmt.managednetworkfabric.models.AdministrativeState + :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". + :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption + :ivar option_b_properties: option B properties. + :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.VpnOptionBProperties + :ivar option_a_properties: option A properties. + :vartype option_a_properties: ~azure.mgmt.managednetworkfabric.models.VpnOptionAProperties + """ + + network_to_network_interconnect_id: Optional[str] = rest_field( + name="networkToNetworkInterconnectId", visibility=["read", "create", "update", "delete", "query"] + ) + """ARM Resource ID of the Network To Network Interconnect.""" + administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = rest_field( + name="administrativeState", visibility=["read"] + ) + """Administrative state of the resource. Known values are: \"Enabled\", \"Disabled\", \"MAT\", + \"RMA\", \"UnderMaintenance\", and \"EnabledDegraded\".""" + peering_option: Union[str, "_models.PeeringOption"] = rest_field( + name="peeringOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Peering option list. Required. Known values are: \"OptionA\" and \"OptionB\".""" + option_b_properties: Optional["_models.VpnOptionBProperties"] = rest_field( + name="optionBProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option B properties.""" + option_a_properties: Optional["_models.VpnOptionAProperties"] = rest_field( + name="optionAProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """option A properties.""" + + @overload + def __init__( + self, + *, + peering_option: Union[str, "_models.PeeringOption"], + network_to_network_interconnect_id: Optional[str] = None, + option_b_properties: Optional["_models.VpnOptionBProperties"] = None, + option_a_properties: Optional["_models.VpnOptionAProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnOptionAPatchProperties(Layer3IpPrefixPatchProperties): + """Peering optionA properties. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar mtu: MTU to use for option A peering. + :vartype mtu: int + :ivar vlan_id: Vlan Id.Example : 501. + :vartype vlan_id: int + :ivar peer_asn: Peer ASN number.Example : 28. + :vartype peer_asn: int + :ivar bfd_configuration: BFD Configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdPatchConfiguration + """ + + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU to use for option A peering.""" + vlan_id: Optional[int] = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan Id.Example : 501.""" + peer_asn: Optional[int] = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN number.Example : 28.""" + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Configuration properties.""" + + @overload + def __init__( + self, + *, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + mtu: Optional[int] = None, + vlan_id: Optional[int] = None, + peer_asn: Optional[int] = None, + bfd_configuration: Optional["_models.BfdPatchConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnOptionAProperties(Layer3IpPrefixProperties): + """option A properties. + + :ivar primary_ipv4_prefix: IPv4 Address Prefix. + :vartype primary_ipv4_prefix: str + :ivar primary_ipv6_prefix: IPv6 Address Prefix. + :vartype primary_ipv6_prefix: str + :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. + :vartype secondary_ipv4_prefix: str + :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. + :vartype secondary_ipv6_prefix: str + :ivar mtu: MTU to use for option A peering. + :vartype mtu: int + :ivar vlan_id: Vlan Id.Example : 501. Required. + :vartype vlan_id: int + :ivar peer_asn: Peer ASN number.Example : 28. Required. + :vartype peer_asn: int + :ivar bfd_configuration: BFD Configuration properties. + :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration + """ + + mtu: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """MTU to use for option A peering.""" + vlan_id: int = rest_field(name="vlanId", visibility=["read", "create", "update", "delete", "query"]) + """Vlan Id.Example : 501. Required.""" + peer_asn: int = rest_field(name="peerASN", visibility=["read", "create", "update", "delete", "query"]) + """Peer ASN number.Example : 28. Required.""" + bfd_configuration: Optional["_models.BfdConfiguration"] = rest_field( + name="bfdConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """BFD Configuration properties.""" + + @overload + def __init__( + self, + *, + vlan_id: int, + peer_asn: int, + primary_ipv4_prefix: Optional[str] = None, + primary_ipv6_prefix: Optional[str] = None, + secondary_ipv4_prefix: Optional[str] = None, + secondary_ipv6_prefix: Optional[str] = None, + mtu: Optional[int] = None, + bfd_configuration: Optional["_models.BfdConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnOptionBPatchProperties(_Model): + """Option B configuration to be used for Management VPN. + + :ivar import_route_targets: Route Targets to be applied for incoming routes into CE. This is + for backward compatibility. + :vartype import_route_targets: list[str] + :ivar export_route_targets: Route Targets to be applied for outgoing routes from CE. This is + for backward compatibility. + :vartype export_route_targets: list[str] + :ivar route_targets: Route Targets to be applied. + :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetPatchInformation + """ + + import_route_targets: Optional[list[str]] = rest_field( + name="importRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes into CE. This is for backward compatibility.""" + export_route_targets: Optional[list[str]] = rest_field( + name="exportRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes from CE. This is for backward compatibility.""" + route_targets: Optional["_models.RouteTargetPatchInformation"] = rest_field( + name="routeTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied.""" + + @overload + def __init__( + self, + *, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, + route_targets: Optional["_models.RouteTargetPatchInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VpnOptionBProperties(_Model): + """Option B configuration to be used for Management VPN. + + :ivar import_route_targets: Route Targets to be applied for incoming routes into CE. This is + for backward compatibility. + :vartype import_route_targets: list[str] + :ivar export_route_targets: Route Targets to be applied for outgoing routes from CE. This is + for backward compatibility. + :vartype export_route_targets: list[str] + :ivar route_targets: Route Targets to be applied. + :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation + """ + + import_route_targets: Optional[list[str]] = rest_field( + name="importRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for incoming routes into CE. This is for backward compatibility.""" + export_route_targets: Optional[list[str]] = rest_field( + name="exportRouteTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied for outgoing routes from CE. This is for backward compatibility.""" + route_targets: Optional["_models.RouteTargetInformation"] = rest_field( + name="routeTargets", visibility=["read", "create", "update", "delete", "query"] + ) + """Route Targets to be applied.""" + + @overload + def __init__( + self, + *, + import_route_targets: Optional[list[str]] = None, + export_route_targets: Optional[list[str]] = None, + route_targets: Optional["_models.RouteTargetInformation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py deleted file mode 100644 index 36acdfe887ee..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_models_py3.py +++ /dev/null @@ -1,12445 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -import datetime -from typing import Any, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - - -class AccessControlList(TrackedResource): - """The Access Control List resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar acls_url: Access Control List file URL. - :vartype acls_url: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar last_synced_time: The last synced timestamp. - :vartype last_synced_time: ~datetime.datetime - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "acls_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - "last_synced_time": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "configuration_type": {"key": "properties.configurationType", "type": "str"}, - "acls_url": {"key": "properties.aclsUrl", "type": "str"}, - "default_action": {"key": "properties.defaultAction", "type": "str"}, - "match_configurations": { - "key": "properties.matchConfigurations", - "type": "[AccessControlListMatchConfiguration]", - }, - "dynamic_match_configurations": { - "key": "properties.dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "last_synced_time": {"key": "properties.lastSyncedTime", "type": "iso-8601"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - acls_url: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword acls_url: Access Control List file URL. - :paramtype acls_url: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.configuration_type = configuration_type - self.acls_url = acls_url - self.default_action = default_action - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.last_synced_time: Optional[datetime.datetime] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class AccessControlListAction(_serialization.Model): - """Action that need to performed. - - :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", and - "Log". - :vartype type: str or ~azure.mgmt.managednetworkfabric.models.AclActionType - :ivar counter_name: Name of the counter block to get match count information. - :vartype counter_name: str - """ - - _validation = { - "counter_name": {"min_length": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "counter_name": {"key": "counterName", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.AclActionType"]] = None, - counter_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Type of actions that can be performed. Known values are: "Drop", "Count", and - "Log". - :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.AclActionType - :keyword counter_name: Name of the counter block to get match count information. - :paramtype counter_name: str - """ - super().__init__(**kwargs) - self.type = type - self.counter_name = counter_name - - -class CommonMatchConditions(_serialization.Model): - """Defines the common match conditions of the ACL and Network Tap Rule. - - :ivar protocol_types: List of the protocols that need to be matched. - :vartype protocol_types: list[str] - :ivar vlan_match_condition: Vlan match condition that needs to be matched. - :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :ivar ip_condition: IP condition that needs to be matched. - :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - """ - - _validation = { - "protocol_types": {"min_items": 1}, - } - - _attribute_map = { - "protocol_types": {"key": "protocolTypes", "type": "[str]"}, - "vlan_match_condition": {"key": "vlanMatchCondition", "type": "VlanMatchCondition"}, - "ip_condition": {"key": "ipCondition", "type": "IpMatchCondition"}, - } - - def __init__( - self, - *, - protocol_types: Optional[list[str]] = None, - vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, - ip_condition: Optional["_models.IpMatchCondition"] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_types: List of the protocols that need to be matched. - :paramtype protocol_types: list[str] - :keyword vlan_match_condition: Vlan match condition that needs to be matched. - :paramtype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :keyword ip_condition: IP condition that needs to be matched. - :paramtype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - """ - super().__init__(**kwargs) - self.protocol_types = protocol_types - self.vlan_match_condition = vlan_match_condition - self.ip_condition = ip_condition - - -class AccessControlListMatchCondition(CommonMatchConditions): - """Defines the match condition that is supported to filter the traffic. - - :ivar protocol_types: List of the protocols that need to be matched. - :vartype protocol_types: list[str] - :ivar vlan_match_condition: Vlan match condition that needs to be matched. - :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :ivar ip_condition: IP condition that needs to be matched. - :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :ivar ether_types: List of ether type values that need to be matched. - :vartype ether_types: list[str] - :ivar fragments: List of IP fragment packets that need to be matched. - :vartype fragments: list[str] - :ivar ip_lengths: List of IP Lengths that need to be matched. - :vartype ip_lengths: list[str] - :ivar ttl_values: List of TTL [Time To Live] values that need to be matched. - :vartype ttl_values: list[str] - :ivar dscp_markings: List of DSCP Markings that need to be matched. - :vartype dscp_markings: list[str] - :ivar port_condition: Defines the port condition that needs to be matched. - :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition - """ - - _validation = { - "protocol_types": {"min_items": 1}, - "ether_types": {"min_items": 1}, - "fragments": {"min_items": 1}, - "ip_lengths": {"min_items": 1}, - "ttl_values": {"min_items": 1}, - "dscp_markings": {"min_items": 1}, - } - - _attribute_map = { - "protocol_types": {"key": "protocolTypes", "type": "[str]"}, - "vlan_match_condition": {"key": "vlanMatchCondition", "type": "VlanMatchCondition"}, - "ip_condition": {"key": "ipCondition", "type": "IpMatchCondition"}, - "ether_types": {"key": "etherTypes", "type": "[str]"}, - "fragments": {"key": "fragments", "type": "[str]"}, - "ip_lengths": {"key": "ipLengths", "type": "[str]"}, - "ttl_values": {"key": "ttlValues", "type": "[str]"}, - "dscp_markings": {"key": "dscpMarkings", "type": "[str]"}, - "port_condition": {"key": "portCondition", "type": "AccessControlListPortCondition"}, - } - - def __init__( - self, - *, - protocol_types: Optional[list[str]] = None, - vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, - ip_condition: Optional["_models.IpMatchCondition"] = None, - ether_types: Optional[list[str]] = None, - fragments: Optional[list[str]] = None, - ip_lengths: Optional[list[str]] = None, - ttl_values: Optional[list[str]] = None, - dscp_markings: Optional[list[str]] = None, - port_condition: Optional["_models.AccessControlListPortCondition"] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_types: List of the protocols that need to be matched. - :paramtype protocol_types: list[str] - :keyword vlan_match_condition: Vlan match condition that needs to be matched. - :paramtype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :keyword ip_condition: IP condition that needs to be matched. - :paramtype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :keyword ether_types: List of ether type values that need to be matched. - :paramtype ether_types: list[str] - :keyword fragments: List of IP fragment packets that need to be matched. - :paramtype fragments: list[str] - :keyword ip_lengths: List of IP Lengths that need to be matched. - :paramtype ip_lengths: list[str] - :keyword ttl_values: List of TTL [Time To Live] values that need to be matched. - :paramtype ttl_values: list[str] - :keyword dscp_markings: List of DSCP Markings that need to be matched. - :paramtype dscp_markings: list[str] - :keyword port_condition: Defines the port condition that needs to be matched. - :paramtype port_condition: - ~azure.mgmt.managednetworkfabric.models.AccessControlListPortCondition - """ - super().__init__( - protocol_types=protocol_types, - vlan_match_condition=vlan_match_condition, - ip_condition=ip_condition, - **kwargs - ) - self.ether_types = ether_types - self.fragments = fragments - self.ip_lengths = ip_lengths - self.ttl_values = ttl_values - self.dscp_markings = dscp_markings - self.port_condition = port_condition - - -class AccessControlListMatchConfiguration(_serialization.Model): - """Defines the match configuration that are supported to filter the traffic. - - :ivar match_configuration_name: The name of the match configuration. - :vartype match_configuration_name: str - :ivar sequence_number: Sequence Number of the match configuration. - :vartype sequence_number: int - :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". - :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :ivar match_conditions: List of the match conditions. - :vartype match_conditions: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition] - :ivar actions: List of actions that need to be performed for the matched conditions. - :vartype actions: list[~azure.mgmt.managednetworkfabric.models.AccessControlListAction] - """ - - _validation = { - "match_configuration_name": {"min_length": 1}, - "sequence_number": {"maximum": 4294967295, "minimum": 1}, - "match_conditions": {"min_items": 1}, - "actions": {"min_items": 1}, - } - - _attribute_map = { - "match_configuration_name": {"key": "matchConfigurationName", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "ip_address_type": {"key": "ipAddressType", "type": "str"}, - "match_conditions": {"key": "matchConditions", "type": "[AccessControlListMatchCondition]"}, - "actions": {"key": "actions", "type": "[AccessControlListAction]"}, - } - - def __init__( - self, - *, - match_configuration_name: Optional[str] = None, - sequence_number: Optional[int] = None, - ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - match_conditions: Optional[list["_models.AccessControlListMatchCondition"]] = None, - actions: Optional[list["_models.AccessControlListAction"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword match_configuration_name: The name of the match configuration. - :paramtype match_configuration_name: str - :keyword sequence_number: Sequence Number of the match configuration. - :paramtype sequence_number: int - :keyword ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and - "IPv6". - :paramtype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :keyword match_conditions: List of the match conditions. - :paramtype match_conditions: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchCondition] - :keyword actions: List of actions that need to be performed for the matched conditions. - :paramtype actions: list[~azure.mgmt.managednetworkfabric.models.AccessControlListAction] - """ - super().__init__(**kwargs) - self.match_configuration_name = match_configuration_name - self.sequence_number = sequence_number - self.ip_address_type = ip_address_type - self.match_conditions = match_conditions - self.actions = actions - - -class TagsUpdate(_serialization.Model): - """Base tracked resource type for PATCH updates. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.tags = tags - - -class AccessControlListPatch(TagsUpdate): - """The Access Control Lists patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar acls_url: Access Control List file URL. - :vartype acls_url: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _validation = { - "acls_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "configuration_type": {"key": "properties.configurationType", "type": "str"}, - "acls_url": {"key": "properties.aclsUrl", "type": "str"}, - "default_action": {"key": "properties.defaultAction", "type": "str"}, - "match_configurations": { - "key": "properties.matchConfigurations", - "type": "[AccessControlListMatchConfiguration]", - }, - "dynamic_match_configurations": { - "key": "properties.dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "annotation": {"key": "properties.annotation", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - acls_url: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword acls_url: Access Control List file URL. - :paramtype acls_url: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(tags=tags, **kwargs) - self.configuration_type = configuration_type - self.acls_url = acls_url - self.default_action = default_action - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.annotation = annotation - - -class AccessControlListPatchableProperties(_serialization.Model): - """Access Control List Patch Properties defines the patchable resource properties. - - :ivar configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar acls_url: Access Control List file URL. - :vartype acls_url: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - - _validation = { - "acls_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "configuration_type": {"key": "configurationType", "type": "str"}, - "acls_url": {"key": "aclsUrl", "type": "str"}, - "default_action": {"key": "defaultAction", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - } - - def __init__( - self, - *, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - acls_url: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword acls_url: Access Control List file URL. - :paramtype acls_url: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - super().__init__(**kwargs) - self.configuration_type = configuration_type - self.acls_url = acls_url - self.default_action = default_action - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - - -class AnnotationResource(_serialization.Model): - """Switch configuration entries require a description to discern between configuration groups. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(**kwargs) - self.annotation = annotation - - -class AccessControlListPatchProperties(AccessControlListPatchableProperties, AnnotationResource): - """Access Control Lists patch properties. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar acls_url: Access Control List file URL. - :vartype acls_url: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - - _validation = { - "acls_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "configuration_type": {"key": "configurationType", "type": "str"}, - "acls_url": {"key": "aclsUrl", "type": "str"}, - "default_action": {"key": "defaultAction", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - acls_url: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword acls_url: Access Control List file URL. - :paramtype acls_url: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - super().__init__( - configuration_type=configuration_type, - acls_url=acls_url, - default_action=default_action, - match_configurations=match_configurations, - dynamic_match_configurations=dynamic_match_configurations, - annotation=annotation, - **kwargs - ) - self.annotation = annotation - self.configuration_type = configuration_type - self.acls_url = acls_url - self.default_action = default_action - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - - -class PortCondition(_serialization.Model): - """Port condition that needs to be matched. - - All required parameters must be populated in order to send to server. - - :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort" and - "DestinationPort". - :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType - :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values - are: "TCP" and "UDP". - :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol - :ivar ports: List of the Ports that need to be matched. - :vartype ports: list[str] - :ivar port_group_names: List of the port Group Names that need to be matched. - :vartype port_group_names: list[str] - """ - - _validation = { - "layer4_protocol": {"required": True}, - "ports": {"min_items": 1}, - "port_group_names": {"min_items": 1}, - } - - _attribute_map = { - "port_type": {"key": "portType", "type": "str"}, - "layer4_protocol": {"key": "layer4Protocol", "type": "str"}, - "ports": {"key": "ports", "type": "[str]"}, - "port_group_names": {"key": "portGroupNames", "type": "[str]"}, - } - - def __init__( - self, - *, - layer4_protocol: Union[str, "_models.Layer4Protocol"], - port_type: Optional[Union[str, "_models.PortType"]] = None, - ports: Optional[list[str]] = None, - port_group_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword port_type: Port type that needs to be matched. Known values are: "SourcePort" and - "DestinationPort". - :paramtype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType - :keyword layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values - are: "TCP" and "UDP". - :paramtype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol - :keyword ports: List of the Ports that need to be matched. - :paramtype ports: list[str] - :keyword port_group_names: List of the port Group Names that need to be matched. - :paramtype port_group_names: list[str] - """ - super().__init__(**kwargs) - self.port_type = port_type - self.layer4_protocol = layer4_protocol - self.ports = ports - self.port_group_names = port_group_names - - -class AccessControlListPortCondition(PortCondition): - """Defines the port condition that needs to be matched. - - All required parameters must be populated in order to send to server. - - :ivar port_type: Port type that needs to be matched. Known values are: "SourcePort" and - "DestinationPort". - :vartype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType - :ivar layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values - are: "TCP" and "UDP". - :vartype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol - :ivar ports: List of the Ports that need to be matched. - :vartype ports: list[str] - :ivar port_group_names: List of the port Group Names that need to be matched. - :vartype port_group_names: list[str] - :ivar flags: List of protocol flags that need to be matched. Example: established | initial | - :code:``. List of eligible TCP Flags are ack, fin, not-ack, not-fin, - not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg. - :vartype flags: list[str] - """ - - _validation = { - "layer4_protocol": {"required": True}, - "ports": {"min_items": 1}, - "port_group_names": {"min_items": 1}, - } - - _attribute_map = { - "port_type": {"key": "portType", "type": "str"}, - "layer4_protocol": {"key": "layer4Protocol", "type": "str"}, - "ports": {"key": "ports", "type": "[str]"}, - "port_group_names": {"key": "portGroupNames", "type": "[str]"}, - "flags": {"key": "flags", "type": "[str]"}, - } - - def __init__( - self, - *, - layer4_protocol: Union[str, "_models.Layer4Protocol"], - port_type: Optional[Union[str, "_models.PortType"]] = None, - ports: Optional[list[str]] = None, - port_group_names: Optional[list[str]] = None, - flags: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword port_type: Port type that needs to be matched. Known values are: "SourcePort" and - "DestinationPort". - :paramtype port_type: str or ~azure.mgmt.managednetworkfabric.models.PortType - :keyword layer4_protocol: Layer4 protocol type that needs to be matched. Required. Known values - are: "TCP" and "UDP". - :paramtype layer4_protocol: str or ~azure.mgmt.managednetworkfabric.models.Layer4Protocol - :keyword ports: List of the Ports that need to be matched. - :paramtype ports: list[str] - :keyword port_group_names: List of the port Group Names that need to be matched. - :paramtype port_group_names: list[str] - :keyword flags: List of protocol flags that need to be matched. Example: established | initial - | :code:``. List of eligible TCP Flags are ack, fin, not-ack, not-fin, - not-psh, not-rst, not-syn, not-urg, psh, rst, syn, urg. - :paramtype flags: list[str] - """ - super().__init__( - port_type=port_type, - layer4_protocol=layer4_protocol, - ports=ports, - port_group_names=port_group_names, - **kwargs - ) - self.flags = flags - - -class AccessControlListProperties(AnnotationResource, AccessControlListPatchableProperties): - """Access Control List Properties defines the resource properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar acls_url: Access Control List file URL. - :vartype acls_url: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar last_synced_time: The last synced timestamp. - :vartype last_synced_time: ~datetime.datetime - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "acls_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - "last_synced_time": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "configuration_type": {"key": "configurationType", "type": "str"}, - "acls_url": {"key": "aclsUrl", "type": "str"}, - "default_action": {"key": "defaultAction", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[AccessControlListMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "annotation": {"key": "annotation", "type": "str"}, - "last_synced_time": {"key": "lastSyncedTime", "type": "iso-8601"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - acls_url: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - match_configurations: Optional[list["_models.AccessControlListMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword configuration_type: Input method to configure Access Control List. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword acls_url: Access Control List file URL. - :paramtype acls_url: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.AccessControlListMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__( - annotation=annotation, - configuration_type=configuration_type, - acls_url=acls_url, - default_action=default_action, - match_configurations=match_configurations, - dynamic_match_configurations=dynamic_match_configurations, - **kwargs - ) - self.configuration_type = configuration_type - self.acls_url = acls_url - self.default_action = default_action - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.last_synced_time: Optional[datetime.datetime] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class AccessControlListsListResult(_serialization.Model): - """List of Access Control Lists. - - :ivar value: List of Access Control List resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AccessControlList]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.AccessControlList"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of Access Control List resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IpCommunitySetOperationProperties(_serialization.Model): - """IP Community set operation properties. - - :ivar set: List of IP Community IDs. - :vartype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - - _attribute_map = { - "set": {"key": "set", "type": "IpCommunityIdList"}, - } - - def __init__(self, *, set: Optional["_models.IpCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword set: List of IP Community IDs. - :paramtype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - super().__init__(**kwargs) - self.set = set - - -class IpCommunityDeleteOperationProperties(_serialization.Model): - """IP Community delete operation properties. - - :ivar delete: List of IP Community IDs. - :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - - _attribute_map = { - "delete": {"key": "delete", "type": "IpCommunityIdList"}, - } - - def __init__(self, *, delete: Optional["_models.IpCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword delete: List of IP Community IDs. - :paramtype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - super().__init__(**kwargs) - self.delete = delete - - -class IpCommunityAddOperationProperties(_serialization.Model): - """IP Community add operation properties. - - :ivar add: List of IP Community IDs. - :vartype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - - _attribute_map = { - "add": {"key": "add", "type": "IpCommunityIdList"}, - } - - def __init__(self, *, add: Optional["_models.IpCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword add: List of IP Community IDs. - :paramtype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - super().__init__(**kwargs) - self.add = add - - -class ActionIpCommunityProperties( - IpCommunityAddOperationProperties, IpCommunityDeleteOperationProperties, IpCommunitySetOperationProperties -): - """IP Community Properties. - - :ivar set: List of IP Community IDs. - :vartype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - :ivar delete: List of IP Community IDs. - :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - :ivar add: List of IP Community IDs. - :vartype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - - _attribute_map = { - "set": {"key": "set", "type": "IpCommunityIdList"}, - "delete": {"key": "delete", "type": "IpCommunityIdList"}, - "add": {"key": "add", "type": "IpCommunityIdList"}, - } - - def __init__( - self, - *, - set: Optional["_models.IpCommunityIdList"] = None, - delete: Optional["_models.IpCommunityIdList"] = None, - add: Optional["_models.IpCommunityIdList"] = None, - **kwargs: Any - ) -> None: - """ - :keyword set: List of IP Community IDs. - :paramtype set: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - :keyword delete: List of IP Community IDs. - :paramtype delete: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - :keyword add: List of IP Community IDs. - :paramtype add: ~azure.mgmt.managednetworkfabric.models.IpCommunityIdList - """ - super().__init__(add=add, delete=delete, set=set, **kwargs) - self.set = set - self.delete = delete - self.add = add - - -class IpExtendedCommunitySetOperationProperties(_serialization.Model): # pylint: disable=name-too-long - """IP Extended Community set operation properties. - - :ivar set: List of IP Extended Community IDs. - :vartype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - - _attribute_map = { - "set": {"key": "set", "type": "IpExtendedCommunityIdList"}, - } - - def __init__(self, *, set: Optional["_models.IpExtendedCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword set: List of IP Extended Community IDs. - :paramtype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - super().__init__(**kwargs) - self.set = set - - -class IpExtendedCommunityDeleteOperationProperties(_serialization.Model): # pylint: disable=name-too-long - """IP Extended Community delete operation properties. - - :ivar delete: List of IP Extended Community IDs. - :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - - _attribute_map = { - "delete": {"key": "delete", "type": "IpExtendedCommunityIdList"}, - } - - def __init__(self, *, delete: Optional["_models.IpExtendedCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword delete: List of IP Extended Community IDs. - :paramtype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - super().__init__(**kwargs) - self.delete = delete - - -class IpExtendedCommunityAddOperationProperties(_serialization.Model): # pylint: disable=name-too-long - """IP Extended Community add operation properties. - - :ivar add: List of IP Extended Community IDs. - :vartype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - - _attribute_map = { - "add": {"key": "add", "type": "IpExtendedCommunityIdList"}, - } - - def __init__(self, *, add: Optional["_models.IpExtendedCommunityIdList"] = None, **kwargs: Any) -> None: - """ - :keyword add: List of IP Extended Community IDs. - :paramtype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - super().__init__(**kwargs) - self.add = add - - -class ActionIpExtendedCommunityProperties( - IpExtendedCommunityAddOperationProperties, - IpExtendedCommunityDeleteOperationProperties, - IpExtendedCommunitySetOperationProperties, -): - """IP Extended Community Properties. - - :ivar set: List of IP Extended Community IDs. - :vartype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - :ivar delete: List of IP Extended Community IDs. - :vartype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - :ivar add: List of IP Extended Community IDs. - :vartype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - - _attribute_map = { - "set": {"key": "set", "type": "IpExtendedCommunityIdList"}, - "delete": {"key": "delete", "type": "IpExtendedCommunityIdList"}, - "add": {"key": "add", "type": "IpExtendedCommunityIdList"}, - } - - def __init__( - self, - *, - set: Optional["_models.IpExtendedCommunityIdList"] = None, - delete: Optional["_models.IpExtendedCommunityIdList"] = None, - add: Optional["_models.IpExtendedCommunityIdList"] = None, - **kwargs: Any - ) -> None: - """ - :keyword set: List of IP Extended Community IDs. - :paramtype set: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - :keyword delete: List of IP Extended Community IDs. - :paramtype delete: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - :keyword add: List of IP Extended Community IDs. - :paramtype add: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityIdList - """ - super().__init__(add=add, delete=delete, set=set, **kwargs) - self.set = set - self.delete = delete - self.add = add - - -class AggregateRoute(_serialization.Model): - """aggregateIpv4Route model. - - All required parameters must be populated in order to send to server. - - :ivar prefix: IPv4 Prefix of the aggregate Ipv4Route. Required. - :vartype prefix: str - """ - - _validation = { - "prefix": {"required": True, "min_length": 1}, - } - - _attribute_map = { - "prefix": {"key": "prefix", "type": "str"}, - } - - def __init__(self, *, prefix: str, **kwargs: Any) -> None: - """ - :keyword prefix: IPv4 Prefix of the aggregate Ipv4Route. Required. - :paramtype prefix: str - """ - super().__init__(**kwargs) - self.prefix = prefix - - -class AggregateRouteConfiguration(_serialization.Model): - """List of IPv4 and IPv6 aggregate routes. - - :ivar ipv4_routes: List of IPv4 Route prefixes. - :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] - :ivar ipv6_routes: List of Ipv6Routes prefixes. - :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] - """ - - _validation = { - "ipv4_routes": {"min_items": 1}, - "ipv6_routes": {"min_items": 1}, - } - - _attribute_map = { - "ipv4_routes": {"key": "ipv4Routes", "type": "[AggregateRoute]"}, - "ipv6_routes": {"key": "ipv6Routes", "type": "[AggregateRoute]"}, - } - - def __init__( - self, - *, - ipv4_routes: Optional[list["_models.AggregateRoute"]] = None, - ipv6_routes: Optional[list["_models.AggregateRoute"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ipv4_routes: List of IPv4 Route prefixes. - :paramtype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] - :keyword ipv6_routes: List of Ipv6Routes prefixes. - :paramtype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.AggregateRoute] - """ - super().__init__(**kwargs) - self.ipv4_routes = ipv4_routes - self.ipv6_routes = ipv6_routes - - -class BfdConfiguration(_serialization.Model): - """BFD configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar administrative_state: Administrative state of the BfdConfiguration. Example: Enabled | - Disabled. Known values are: "Enabled", "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.BfdAdministrativeState - :ivar interval_in_milli_seconds: Interval in milliseconds. Example: 300. - :vartype interval_in_milli_seconds: int - :ivar multiplier: Multiplier for the Bfd Configuration. Example: 5. - :vartype multiplier: int - """ - - _validation = { - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "administrative_state": {"key": "administrativeState", "type": "str"}, - "interval_in_milli_seconds": {"key": "intervalInMilliSeconds", "type": "int"}, - "multiplier": {"key": "multiplier", "type": "int"}, - } - - def __init__(self, *, interval_in_milli_seconds: int = 300, multiplier: int = 5, **kwargs: Any) -> None: - """ - :keyword interval_in_milli_seconds: Interval in milliseconds. Example: 300. - :paramtype interval_in_milli_seconds: int - :keyword multiplier: Multiplier for the Bfd Configuration. Example: 5. - :paramtype multiplier: int - """ - super().__init__(**kwargs) - self.administrative_state: Optional[Union[str, "_models.BfdAdministrativeState"]] = None - self.interval_in_milli_seconds = interval_in_milli_seconds - self.multiplier = multiplier - - -class BgpConfiguration(AnnotationResource): - """BGP configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype default_route_originate: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :ivar allow_as: Allows for routes to be received and processed even if the router detects its - own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. - :vartype allow_as: int - :ivar allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". - :vartype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride - :ivar fabric_asn: ASN of Network Fabric. Example: 65048. - :vartype fabric_asn: int - :ivar peer_asn: Peer ASN. Example: 65047. - :vartype peer_asn: int - :ivar ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. - :vartype ipv4_listen_range_prefixes: list[str] - :ivar ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. - :vartype ipv6_listen_range_prefixes: list[str] - :ivar ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. - :vartype ipv4_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - :ivar ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. - :vartype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - """ - - _validation = { - "allow_as": {"maximum": 10, "minimum": 0}, - "fabric_asn": {"readonly": True}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - "ipv4_listen_range_prefixes": {"min_items": 1}, - "ipv6_listen_range_prefixes": {"min_items": 1}, - "ipv4_neighbor_address": {"min_items": 1}, - "ipv6_neighbor_address": {"min_items": 1}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "default_route_originate": {"key": "defaultRouteOriginate", "type": "str"}, - "allow_as": {"key": "allowAS", "type": "int"}, - "allow_as_override": {"key": "allowASOverride", "type": "str"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "ipv4_listen_range_prefixes": {"key": "ipv4ListenRangePrefixes", "type": "[str]"}, - "ipv6_listen_range_prefixes": {"key": "ipv6ListenRangePrefixes", "type": "[str]"}, - "ipv4_neighbor_address": {"key": "ipv4NeighborAddress", "type": "[NeighborAddress]"}, - "ipv6_neighbor_address": {"key": "ipv6NeighborAddress", "type": "[NeighborAddress]"}, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - default_route_originate: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, - allow_as: int = 2, - allow_as_override: Optional[Union[str, "_models.AllowASOverride"]] = None, - peer_asn: Optional[int] = None, - ipv4_listen_range_prefixes: Optional[list[str]] = None, - ipv6_listen_range_prefixes: Optional[list[str]] = None, - ipv4_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, - ipv6_neighbor_address: Optional[list["_models.NeighborAddress"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values - are: "True" and "False". - :paramtype default_route_originate: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :keyword allow_as: Allows for routes to be received and processed even if the router detects - its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. - :paramtype allow_as: int - :keyword allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". - :paramtype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride - :keyword peer_asn: Peer ASN. Example: 65047. - :paramtype peer_asn: int - :keyword ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. - :paramtype ipv4_listen_range_prefixes: list[str] - :keyword ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. - :paramtype ipv6_listen_range_prefixes: list[str] - :keyword ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. - :paramtype ipv4_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - :keyword ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. - :paramtype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - """ - super().__init__(annotation=annotation, **kwargs) - self.bfd_configuration = bfd_configuration - self.default_route_originate = default_route_originate - self.allow_as = allow_as - self.allow_as_override = allow_as_override - self.fabric_asn: Optional[int] = None - self.peer_asn = peer_asn - self.ipv4_listen_range_prefixes = ipv4_listen_range_prefixes - self.ipv6_listen_range_prefixes = ipv6_listen_range_prefixes - self.ipv4_neighbor_address = ipv4_neighbor_address - self.ipv6_neighbor_address = ipv6_neighbor_address - - -class CommonDynamicMatchConfiguration(_serialization.Model): - """Dynamic match configuration object. - - :ivar ip_groups: List of IP Groups. - :vartype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupProperties] - :ivar vlan_groups: List of vlan groups. - :vartype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupProperties] - :ivar port_groups: List of the port groups. - :vartype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupProperties] - """ - - _validation = { - "ip_groups": {"min_items": 1}, - "vlan_groups": {"min_items": 1}, - "port_groups": {"min_items": 1}, - } - - _attribute_map = { - "ip_groups": {"key": "ipGroups", "type": "[IpGroupProperties]"}, - "vlan_groups": {"key": "vlanGroups", "type": "[VlanGroupProperties]"}, - "port_groups": {"key": "portGroups", "type": "[PortGroupProperties]"}, - } - - def __init__( - self, - *, - ip_groups: Optional[list["_models.IpGroupProperties"]] = None, - vlan_groups: Optional[list["_models.VlanGroupProperties"]] = None, - port_groups: Optional[list["_models.PortGroupProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_groups: List of IP Groups. - :paramtype ip_groups: list[~azure.mgmt.managednetworkfabric.models.IpGroupProperties] - :keyword vlan_groups: List of vlan groups. - :paramtype vlan_groups: list[~azure.mgmt.managednetworkfabric.models.VlanGroupProperties] - :keyword port_groups: List of the port groups. - :paramtype port_groups: list[~azure.mgmt.managednetworkfabric.models.PortGroupProperties] - """ - super().__init__(**kwargs) - self.ip_groups = ip_groups - self.vlan_groups = vlan_groups - self.port_groups = port_groups - - -class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class CommonPostActionResponseForDeviceUpdate(ErrorResponse): - """Common response for device updates. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: The error object. - :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar successful_devices: List of ARM Resource IDs for which the given action applied - successfully. - :vartype successful_devices: list[str] - :ivar failed_devices: List of ARM Resource IDs for which the given action failed to apply. - :vartype failed_devices: list[str] - """ - - _validation = { - "configuration_state": {"readonly": True}, - } - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "successful_devices": {"key": "successfulDevices", "type": "[str]"}, - "failed_devices": {"key": "failedDevices", "type": "[str]"}, - } - - def __init__( - self, - *, - error: Optional["_models.ErrorDetail"] = None, - successful_devices: Optional[list[str]] = None, - failed_devices: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - :keyword successful_devices: List of ARM Resource IDs for which the given action applied - successfully. - :paramtype successful_devices: list[str] - :keyword failed_devices: List of ARM Resource IDs for which the given action failed to apply. - :paramtype failed_devices: list[str] - """ - super().__init__(error=error, **kwargs) - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.successful_devices = successful_devices - self.failed_devices = failed_devices - - -class CommonPostActionResponseForStateUpdate(ErrorResponse): - """Common response for the state updates. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: The error object. - :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - """ - - _validation = { - "configuration_state": {"readonly": True}, - } - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - """ - super().__init__(error=error, **kwargs) - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - - -class ConnectedSubnet(AnnotationResource): - """Connected Subnet properties. - - All required parameters must be populated in order to send to server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar prefix: Prefix of the Connected Subnet. Required. - :vartype prefix: str - """ - - _validation = { - "prefix": {"required": True, "min_length": 1}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "prefix": {"key": "prefix", "type": "str"}, - } - - def __init__(self, *, prefix: str, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword prefix: Prefix of the Connected Subnet. Required. - :paramtype prefix: str - """ - super().__init__(annotation=annotation, **kwargs) - self.prefix = prefix - - -class ConnectedSubnetRoutePolicy(_serialization.Model): - """Connected Subnet Route Policy properties. - - :ivar export_route_policy_id: ARM Resource ID of the Route Policy. This is used for the - backward compatibility. - :vartype export_route_policy_id: str - :ivar export_route_policy: Array of ARM Resource ID of the RoutePolicies. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy - """ - - _attribute_map = { - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "L3ExportRoutePolicy"}, - } - - def __init__( - self, - *, - export_route_policy_id: Optional[str] = None, - export_route_policy: Optional["_models.L3ExportRoutePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword export_route_policy_id: ARM Resource ID of the Route Policy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword export_route_policy: Array of ARM Resource ID of the RoutePolicies. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.L3ExportRoutePolicy - """ - super().__init__(**kwargs) - self.export_route_policy_id = export_route_policy_id - self.export_route_policy = export_route_policy - - -class ControllerServices(_serialization.Model): - """Network Fabric Controller services. - - :ivar ipv4_address_spaces: The IPv4 Address space is optional, if the value is not defined at - the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address - subnet is an optional attribute. - :vartype ipv4_address_spaces: list[str] - :ivar ipv6_address_spaces: The IPv6 is not supported right now. - :vartype ipv6_address_spaces: list[str] - """ - - _attribute_map = { - "ipv4_address_spaces": {"key": "ipv4AddressSpaces", "type": "[str]"}, - "ipv6_address_spaces": {"key": "ipv6AddressSpaces", "type": "[str]"}, - } - - def __init__( - self, - *, - ipv4_address_spaces: Optional[list[str]] = None, - ipv6_address_spaces: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ipv4_address_spaces: The IPv4 Address space is optional, if the value is not defined - at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address - subnet is an optional attribute. - :paramtype ipv4_address_spaces: list[str] - :keyword ipv6_address_spaces: The IPv6 is not supported right now. - :paramtype ipv6_address_spaces: list[str] - """ - super().__init__(**kwargs) - self.ipv4_address_spaces = ipv4_address_spaces - self.ipv6_address_spaces = ipv6_address_spaces - - -class DestinationProperties(_serialization.Model): - """The network tap destination properties. - - :ivar name: Destination name. - :vartype name: str - :ivar destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :vartype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :ivar destination_id: The destination Id. ARM Resource ID of either NNI or Internal Networks. - :vartype destination_id: str - :ivar isolation_domain_properties: Isolation Domain Properties. - :vartype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :ivar destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :vartype destination_tap_rule_id: str - """ - - _validation = { - "name": {"min_length": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "destination_type": {"key": "destinationType", "type": "str"}, - "destination_id": {"key": "destinationId", "type": "str"}, - "isolation_domain_properties": {"key": "isolationDomainProperties", "type": "IsolationDomainProperties"}, - "destination_tap_rule_id": {"key": "destinationTapRuleId", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - destination_type: Optional[Union[str, "_models.DestinationType"]] = None, - destination_id: Optional[str] = None, - isolation_domain_properties: Optional["_models.IsolationDomainProperties"] = None, - destination_tap_rule_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Destination name. - :paramtype name: str - :keyword destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :paramtype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :keyword destination_id: The destination Id. ARM Resource ID of either NNI or Internal - Networks. - :paramtype destination_id: str - :keyword isolation_domain_properties: Isolation Domain Properties. - :paramtype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :keyword destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :paramtype destination_tap_rule_id: str - """ - super().__init__(**kwargs) - self.name = name - self.destination_type = destination_type - self.destination_id = destination_id - self.isolation_domain_properties = isolation_domain_properties - self.destination_tap_rule_id = destination_tap_rule_id - - -class DeviceInterfaceProperties(_serialization.Model): - """Network device interface properties. - - :ivar identifier: Interface identifier. Example: HundredGigE0/0. - :vartype identifier: str - :ivar interface_type: Interface type. - :vartype interface_type: str - :ivar supported_connector_types: List of supported connector types. - :vartype supported_connector_types: - list[~azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties] - """ - - _attribute_map = { - "identifier": {"key": "identifier", "type": "str"}, - "interface_type": {"key": "interfaceType", "type": "str"}, - "supported_connector_types": {"key": "supportedConnectorTypes", "type": "[SupportedConnectorProperties]"}, - } - - def __init__( - self, - *, - identifier: Optional[str] = None, - interface_type: Optional[str] = None, - supported_connector_types: Optional[list["_models.SupportedConnectorProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword identifier: Interface identifier. Example: HundredGigE0/0. - :paramtype identifier: str - :keyword interface_type: Interface type. - :paramtype interface_type: str - :keyword supported_connector_types: List of supported connector types. - :paramtype supported_connector_types: - list[~azure.mgmt.managednetworkfabric.models.SupportedConnectorProperties] - """ - super().__init__(**kwargs) - self.identifier = identifier - self.interface_type = interface_type - self.supported_connector_types = supported_connector_types - - -class EnableDisableOnResources(_serialization.Model): - """Update administrative state on list of resources. - - :ivar resource_ids: Network Fabrics or Network Rack resource Id. - :vartype resource_ids: list[str] - """ - - _attribute_map = { - "resource_ids": {"key": "resourceIds", "type": "[str]"}, - } - - def __init__(self, *, resource_ids: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword resource_ids: Network Fabrics or Network Rack resource Id. - :paramtype resource_ids: list[str] - """ - super().__init__(**kwargs) - self.resource_ids = resource_ids - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.info: Optional[JSON] = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.managednetworkfabric.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.managednetworkfabric.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetail"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ExportRoutePolicy(_serialization.Model): - """Export Route Policy either IPv4 or IPv6. - - :ivar export_ipv4_route_policy_id: ARM resource ID of RoutePolicy. - :vartype export_ipv4_route_policy_id: str - :ivar export_ipv6_route_policy_id: ARM resource ID of RoutePolicy. - :vartype export_ipv6_route_policy_id: str - """ - - _attribute_map = { - "export_ipv4_route_policy_id": {"key": "exportIpv4RoutePolicyId", "type": "str"}, - "export_ipv6_route_policy_id": {"key": "exportIpv6RoutePolicyId", "type": "str"}, - } - - def __init__( - self, - *, - export_ipv4_route_policy_id: Optional[str] = None, - export_ipv6_route_policy_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword export_ipv4_route_policy_id: ARM resource ID of RoutePolicy. - :paramtype export_ipv4_route_policy_id: str - :keyword export_ipv6_route_policy_id: ARM resource ID of RoutePolicy. - :paramtype export_ipv6_route_policy_id: str - """ - super().__init__(**kwargs) - self.export_ipv4_route_policy_id = export_ipv4_route_policy_id - self.export_ipv6_route_policy_id = export_ipv6_route_policy_id - - -class ExportRoutePolicyInformation(_serialization.Model): - """Export Route Policy Configuration. - - :ivar export_ipv4_route_policy_id: Export IPv4 Route Policy Id. - :vartype export_ipv4_route_policy_id: str - :ivar export_ipv6_route_policy_id: Export IPv6 Route Policy Id. - :vartype export_ipv6_route_policy_id: str - """ - - _attribute_map = { - "export_ipv4_route_policy_id": {"key": "exportIpv4RoutePolicyId", "type": "str"}, - "export_ipv6_route_policy_id": {"key": "exportIpv6RoutePolicyId", "type": "str"}, - } - - def __init__( - self, - *, - export_ipv4_route_policy_id: Optional[str] = None, - export_ipv6_route_policy_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword export_ipv4_route_policy_id: Export IPv4 Route Policy Id. - :paramtype export_ipv4_route_policy_id: str - :keyword export_ipv6_route_policy_id: Export IPv6 Route Policy Id. - :paramtype export_ipv6_route_policy_id: str - """ - super().__init__(**kwargs) - self.export_ipv4_route_policy_id = export_ipv4_route_policy_id - self.export_ipv6_route_policy_id = export_ipv6_route_policy_id - - -class ExpressRouteConnectionInformation(_serialization.Model): - """The ExpressRoute circuit ID and the Auth Key are required for you to successfully deploy NFC - service. - - All required parameters must be populated in order to send to server. - - :ivar express_route_circuit_id: The express route circuit Azure resource ID, must be of type - Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory - attribute. Required. - :vartype express_route_circuit_id: str - :ivar express_route_authorization_key: Authorization key for the circuit, must be of type - Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. - Required. - :vartype express_route_authorization_key: str - """ - - _validation = { - "express_route_circuit_id": {"required": True}, - "express_route_authorization_key": {"required": True}, - } - - _attribute_map = { - "express_route_circuit_id": {"key": "expressRouteCircuitId", "type": "str"}, - "express_route_authorization_key": {"key": "expressRouteAuthorizationKey", "type": "str"}, - } - - def __init__(self, *, express_route_circuit_id: str, express_route_authorization_key: str, **kwargs: Any) -> None: - """ - :keyword express_route_circuit_id: The express route circuit Azure resource ID, must be of type - Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory - attribute. Required. - :paramtype express_route_circuit_id: str - :keyword express_route_authorization_key: Authorization key for the circuit, must be of type - Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. - Required. - :paramtype express_route_authorization_key: str - """ - super().__init__(**kwargs) - self.express_route_circuit_id = express_route_circuit_id - self.express_route_authorization_key = express_route_authorization_key - - -class ExtendedLocation(_serialization.Model): - """The extended location. - - :ivar type: The extended location type. - :vartype type: str - :ivar name: The extended location name. - :vartype name: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, type: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword type: The extended location type. - :paramtype type: str - :keyword name: The extended location name. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class ExtensionEnumProperty(_serialization.Model): - """Extension property. - - :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - """ - - _attribute_map = { - "extension": {"key": "extension", "type": "str"}, - } - - def __init__(self, *, extension: Union[str, "_models.Extension"] = "NoExtension", **kwargs: Any) -> None: - """ - :keyword extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :paramtype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - """ - super().__init__(**kwargs) - self.extension = extension - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - """ - - -class ExternalNetwork(ProxyResource): - """Defines the External Network 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId - of the ExternalNetwork resource. - :vartype network_to_network_interconnect_id: str - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties object. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :ivar option_a_properties: option A properties object. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "peering_option": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_to_network_interconnect_id": {"key": "properties.networkToNetworkInterconnectId", "type": "str"}, - "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicy"}, - "peering_option": {"key": "properties.peeringOption", "type": "str"}, - "option_b_properties": {"key": "properties.optionBProperties", "type": "L3OptionBProperties"}, - "option_a_properties": { - "key": "properties.optionAProperties", - "type": "ExternalNetworkPropertiesOptionAProperties", - }, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - peering_option: Union[str, "_models.PeeringOption"], - annotation: Optional[str] = None, - network_to_network_interconnect_id: Optional[str] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - option_b_properties: Optional["_models.L3OptionBProperties"] = None, - option_a_properties: Optional["_models.ExternalNetworkPropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_to_network_interconnect_id: ARM Resource ID of the - networkToNetworkInterconnectId of the ExternalNetwork resource. - :paramtype network_to_network_interconnect_id: str - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword peering_option: Peering option list. Required. Known values are: "OptionA" and - "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties object. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :keyword option_a_properties: option A properties object. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties - """ - super().__init__(**kwargs) - self.annotation = annotation - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class ExternalNetworkPatch(_serialization.Model): - """The ExternalNetwork patch resource definition. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId - of the ExternalNetwork resource. - :vartype network_to_network_interconnect_id: str - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties object. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :ivar option_a_properties: option A properties object. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties - """ - - _attribute_map = { - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_to_network_interconnect_id": {"key": "properties.networkToNetworkInterconnectId", "type": "str"}, - "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicy"}, - "peering_option": {"key": "properties.peeringOption", "type": "str"}, - "option_b_properties": {"key": "properties.optionBProperties", "type": "L3OptionBProperties"}, - "option_a_properties": { - "key": "properties.optionAProperties", - "type": "ExternalNetworkPatchPropertiesOptionAProperties", - }, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - network_to_network_interconnect_id: Optional[str] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - peering_option: Optional[Union[str, "_models.PeeringOption"]] = None, - option_b_properties: Optional["_models.L3OptionBProperties"] = None, - option_a_properties: Optional["_models.ExternalNetworkPatchPropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_to_network_interconnect_id: ARM Resource ID of the - networkToNetworkInterconnectId of the ExternalNetwork resource. - :paramtype network_to_network_interconnect_id: str - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties object. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :keyword option_a_properties: option A properties object. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties - """ - super().__init__(**kwargs) - self.annotation = annotation - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - - -class ExternalNetworkPatchableProperties(_serialization.Model): - """The ExternalNetwork patchable properties. - - :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId - of the ExternalNetwork resource. - :vartype network_to_network_interconnect_id: str - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - """ - - _attribute_map = { - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - } - - def __init__( - self, - *, - network_to_network_interconnect_id: Optional[str] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword network_to_network_interconnect_id: ARM Resource ID of the - networkToNetworkInterconnectId of the ExternalNetwork resource. - :paramtype network_to_network_interconnect_id: str - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - """ - super().__init__(**kwargs) - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - - -class ExternalNetworkPatchProperties(AnnotationResource, ExternalNetworkPatchableProperties): - """External Network Patch properties. - - :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId - of the ExternalNetwork resource. - :vartype network_to_network_interconnect_id: str - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties object. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :ivar option_a_properties: option A properties object. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties - """ - - _attribute_map = { - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - "annotation": {"key": "annotation", "type": "str"}, - "peering_option": {"key": "peeringOption", "type": "str"}, - "option_b_properties": {"key": "optionBProperties", "type": "L3OptionBProperties"}, - "option_a_properties": {"key": "optionAProperties", "type": "ExternalNetworkPatchPropertiesOptionAProperties"}, - } - - def __init__( - self, - *, - network_to_network_interconnect_id: Optional[str] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - annotation: Optional[str] = None, - peering_option: Optional[Union[str, "_models.PeeringOption"]] = None, - option_b_properties: Optional["_models.L3OptionBProperties"] = None, - option_a_properties: Optional["_models.ExternalNetworkPatchPropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword network_to_network_interconnect_id: ARM Resource ID of the - networkToNetworkInterconnectId of the ExternalNetwork resource. - :paramtype network_to_network_interconnect_id: str - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties object. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :keyword option_a_properties: option A properties object. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties - """ - super().__init__( - annotation=annotation, - network_to_network_interconnect_id=network_to_network_interconnect_id, - import_route_policy_id=import_route_policy_id, - export_route_policy_id=export_route_policy_id, - import_route_policy=import_route_policy, - export_route_policy=export_route_policy, - **kwargs - ) - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - self.annotation = annotation - - -class L3OptionAProperties(_serialization.Model): - """Peering optionA properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan identifier. Example : 501. - :vartype vlan_id: int - :ivar fabric_asn: Fabric ASN number. Example 65001. - :vartype fabric_asn: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "fabric_asn": {"readonly": True, "maximum": 4294967295, "minimum": 1}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan identifier. Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - """ - super().__init__(**kwargs) - self.mtu = mtu - self.vlan_id = vlan_id - self.fabric_asn: Optional[int] = None - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - - -class Layer3IpPrefixProperties(_serialization.Model): - """Layer 3 primary and secondary IP Address prefixes. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - """ - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - """ - super().__init__(**kwargs) - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - - -class ExternalNetworkPatchPropertiesOptionAProperties( - Layer3IpPrefixProperties, L3OptionAProperties -): # pylint: disable=name-too-long - """option A properties object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan identifier. Example : 501. - :vartype vlan_id: int - :ivar fabric_asn: Fabric ASN number. Example 65001. - :vartype fabric_asn: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "fabric_asn": {"readonly": True, "maximum": 4294967295, "minimum": 1}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan identifier. Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - """ - super().__init__( - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - mtu=mtu, - vlan_id=vlan_id, - peer_asn=peer_asn, - bfd_configuration=bfd_configuration, - ingress_acl_id=ingress_acl_id, - egress_acl_id=egress_acl_id, - **kwargs - ) - self.mtu = mtu - self.vlan_id = vlan_id - self.fabric_asn: Optional[int] = None - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - - -class ExternalNetworkProperties(AnnotationResource, ExternalNetworkPatchableProperties): - """External Network 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 server. - - :ivar network_to_network_interconnect_id: ARM Resource ID of the networkToNetworkInterconnectId - of the ExternalNetwork resource. - :vartype network_to_network_interconnect_id: str - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties object. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :ivar option_a_properties: option A properties object. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "peering_option": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - "annotation": {"key": "annotation", "type": "str"}, - "peering_option": {"key": "peeringOption", "type": "str"}, - "option_b_properties": {"key": "optionBProperties", "type": "L3OptionBProperties"}, - "option_a_properties": {"key": "optionAProperties", "type": "ExternalNetworkPropertiesOptionAProperties"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - peering_option: Union[str, "_models.PeeringOption"], - network_to_network_interconnect_id: Optional[str] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - annotation: Optional[str] = None, - option_b_properties: Optional["_models.L3OptionBProperties"] = None, - option_a_properties: Optional["_models.ExternalNetworkPropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword network_to_network_interconnect_id: ARM Resource ID of the - networkToNetworkInterconnectId of the ExternalNetwork resource. - :paramtype network_to_network_interconnect_id: str - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword peering_option: Peering option list. Required. Known values are: "OptionA" and - "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties object. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.L3OptionBProperties - :keyword option_a_properties: option A properties object. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties - """ - super().__init__( - annotation=annotation, - network_to_network_interconnect_id=network_to_network_interconnect_id, - import_route_policy_id=import_route_policy_id, - export_route_policy_id=export_route_policy_id, - import_route_policy=import_route_policy, - export_route_policy=export_route_policy, - **kwargs - ) - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class ExternalNetworkPropertiesOptionAProperties( - Layer3IpPrefixProperties, L3OptionAProperties -): # pylint: disable=name-too-long - """option A properties object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan identifier. Example : 501. - :vartype vlan_id: int - :ivar fabric_asn: Fabric ASN number. Example 65001. - :vartype fabric_asn: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "fabric_asn": {"readonly": True, "maximum": 4294967295, "minimum": 1}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan identifier. Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - """ - super().__init__( - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - mtu=mtu, - vlan_id=vlan_id, - peer_asn=peer_asn, - bfd_configuration=bfd_configuration, - ingress_acl_id=ingress_acl_id, - egress_acl_id=egress_acl_id, - **kwargs - ) - self.mtu = mtu - self.vlan_id = vlan_id - self.fabric_asn: Optional[int] = None - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - - -class ExternalNetworksList(_serialization.Model): - """List of External Networks. - - :ivar value: List of External Network resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ExternalNetwork]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.ExternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of External Network resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ImportRoutePolicy(_serialization.Model): - """Import Route Policy either IPv4 or IPv6. - - :ivar import_ipv4_route_policy_id: ARM resource ID of RoutePolicy. - :vartype import_ipv4_route_policy_id: str - :ivar import_ipv6_route_policy_id: ARM resource ID of RoutePolicy. - :vartype import_ipv6_route_policy_id: str - """ - - _attribute_map = { - "import_ipv4_route_policy_id": {"key": "importIpv4RoutePolicyId", "type": "str"}, - "import_ipv6_route_policy_id": {"key": "importIpv6RoutePolicyId", "type": "str"}, - } - - def __init__( - self, - *, - import_ipv4_route_policy_id: Optional[str] = None, - import_ipv6_route_policy_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword import_ipv4_route_policy_id: ARM resource ID of RoutePolicy. - :paramtype import_ipv4_route_policy_id: str - :keyword import_ipv6_route_policy_id: ARM resource ID of RoutePolicy. - :paramtype import_ipv6_route_policy_id: str - """ - super().__init__(**kwargs) - self.import_ipv4_route_policy_id = import_ipv4_route_policy_id - self.import_ipv6_route_policy_id = import_ipv6_route_policy_id - - -class ImportRoutePolicyInformation(_serialization.Model): - """Import Route Policy Configuration. - - :ivar import_ipv4_route_policy_id: Import IPv4 Route Policy Id. - :vartype import_ipv4_route_policy_id: str - :ivar import_ipv6_route_policy_id: Import IPv6 Route Policy Id. - :vartype import_ipv6_route_policy_id: str - """ - - _attribute_map = { - "import_ipv4_route_policy_id": {"key": "importIpv4RoutePolicyId", "type": "str"}, - "import_ipv6_route_policy_id": {"key": "importIpv6RoutePolicyId", "type": "str"}, - } - - def __init__( - self, - *, - import_ipv4_route_policy_id: Optional[str] = None, - import_ipv6_route_policy_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword import_ipv4_route_policy_id: Import IPv4 Route Policy Id. - :paramtype import_ipv4_route_policy_id: str - :keyword import_ipv6_route_policy_id: Import IPv6 Route Policy Id. - :paramtype import_ipv6_route_policy_id: str - """ - super().__init__(**kwargs) - self.import_ipv4_route_policy_id = import_ipv4_route_policy_id - self.import_ipv6_route_policy_id = import_ipv6_route_policy_id - - -class InternalNetwork(ProxyResource): - """Defines the Internal Network 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. - :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. - Known values are: "True" and "False". - :vartype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :ivar vlan_id: Vlan identifier. Example: 1001. Required. - :vartype vlan_id: int - :ivar bgp_configuration: BGP configuration properties. - :vartype bgp_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration - :ivar static_route_configuration: Static Route Configuration properties. - :vartype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "mtu": {"maximum": 9200, "minimum": 64}, - "connected_i_pv4_subnets": {"min_items": 1}, - "connected_i_pv6_subnets": {"min_items": 1}, - "vlan_id": {"required": True, "maximum": 4094, "minimum": 100}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "mtu": {"key": "properties.mtu", "type": "int"}, - "connected_i_pv4_subnets": {"key": "properties.connectedIPv4Subnets", "type": "[ConnectedSubnet]"}, - "connected_i_pv6_subnets": {"key": "properties.connectedIPv6Subnets", "type": "[ConnectedSubnet]"}, - "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicy"}, - "ingress_acl_id": {"key": "properties.ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "properties.egressAclId", "type": "str"}, - "is_monitoring_enabled": {"key": "properties.isMonitoringEnabled", "type": "str"}, - "extension": {"key": "properties.extension", "type": "str"}, - "vlan_id": {"key": "properties.vlanId", "type": "int"}, - "bgp_configuration": { - "key": "properties.bgpConfiguration", - "type": "InternalNetworkPropertiesBgpConfiguration", - }, - "static_route_configuration": { - "key": "properties.staticRouteConfiguration", - "type": "InternalNetworkPropertiesStaticRouteConfiguration", - }, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - vlan_id: int, - annotation: Optional[str] = None, - mtu: int = 1500, - connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - is_monitoring_enabled: Union[str, "_models.IsMonitoringEnabled"] = "False", - extension: Union[str, "_models.Extension"] = "NoExtension", - bgp_configuration: Optional["_models.InternalNetworkPropertiesBgpConfiguration"] = None, - static_route_configuration: Optional["_models.InternalNetworkPropertiesStaticRouteConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - :keyword connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :paramtype connected_i_pv4_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword connected_i_pv6_subnets: List of connected IPv6 Subnets. - :paramtype connected_i_pv6_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword is_monitoring_enabled: To check whether monitoring of internal network is enabled or - not. Known values are: "True" and "False". - :paramtype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :keyword extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :paramtype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :keyword vlan_id: Vlan identifier. Example: 1001. Required. - :paramtype vlan_id: int - :keyword bgp_configuration: BGP configuration properties. - :paramtype bgp_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration - :keyword static_route_configuration: Static Route Configuration properties. - :paramtype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration - """ - super().__init__(**kwargs) - self.annotation = annotation - self.mtu = mtu - self.connected_i_pv4_subnets = connected_i_pv4_subnets - self.connected_i_pv6_subnets = connected_i_pv6_subnets - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.is_monitoring_enabled = is_monitoring_enabled - self.extension = extension - self.vlan_id = vlan_id - self.bgp_configuration = bgp_configuration - self.static_route_configuration = static_route_configuration - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class InternalNetworkPatch(_serialization.Model): - """The InternalNetwork patch resource definition. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. - :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. - Known values are: "True" and "False". - :vartype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :ivar bgp_configuration: BGP configuration properties. - :vartype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpConfiguration - :ivar static_route_configuration: Static Route Configuration properties. - :vartype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "connected_i_pv4_subnets": {"min_items": 1}, - "connected_i_pv6_subnets": {"min_items": 1}, - } - - _attribute_map = { - "annotation": {"key": "properties.annotation", "type": "str"}, - "mtu": {"key": "properties.mtu", "type": "int"}, - "connected_i_pv4_subnets": {"key": "properties.connectedIPv4Subnets", "type": "[ConnectedSubnet]"}, - "connected_i_pv6_subnets": {"key": "properties.connectedIPv6Subnets", "type": "[ConnectedSubnet]"}, - "import_route_policy_id": {"key": "properties.importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "properties.exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicy"}, - "ingress_acl_id": {"key": "properties.ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "properties.egressAclId", "type": "str"}, - "is_monitoring_enabled": {"key": "properties.isMonitoringEnabled", "type": "str"}, - "bgp_configuration": {"key": "properties.bgpConfiguration", "type": "BgpConfiguration"}, - "static_route_configuration": { - "key": "properties.staticRouteConfiguration", - "type": "StaticRouteConfiguration", - }, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - mtu: int = 1500, - connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - is_monitoring_enabled: Union[str, "_models.IsMonitoringEnabled"] = "False", - bgp_configuration: Optional["_models.BgpConfiguration"] = None, - static_route_configuration: Optional["_models.StaticRouteConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - :keyword connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :paramtype connected_i_pv4_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword connected_i_pv6_subnets: List of connected IPv6 Subnets. - :paramtype connected_i_pv6_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword is_monitoring_enabled: To check whether monitoring of internal network is enabled or - not. Known values are: "True" and "False". - :paramtype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :keyword bgp_configuration: BGP configuration properties. - :paramtype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpConfiguration - :keyword static_route_configuration: Static Route Configuration properties. - :paramtype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration - """ - super().__init__(**kwargs) - self.annotation = annotation - self.mtu = mtu - self.connected_i_pv4_subnets = connected_i_pv4_subnets - self.connected_i_pv6_subnets = connected_i_pv6_subnets - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.is_monitoring_enabled = is_monitoring_enabled - self.bgp_configuration = bgp_configuration - self.static_route_configuration = static_route_configuration - - -class InternalNetworkPatchableProperties(_serialization.Model): - """The InternalNetwork patchable properties. - - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. - :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. - Known values are: "True" and "False". - :vartype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "connected_i_pv4_subnets": {"min_items": 1}, - "connected_i_pv6_subnets": {"min_items": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "connected_i_pv4_subnets": {"key": "connectedIPv4Subnets", "type": "[ConnectedSubnet]"}, - "connected_i_pv6_subnets": {"key": "connectedIPv6Subnets", "type": "[ConnectedSubnet]"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - "is_monitoring_enabled": {"key": "isMonitoringEnabled", "type": "str"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - is_monitoring_enabled: Union[str, "_models.IsMonitoringEnabled"] = "False", - **kwargs: Any - ) -> None: - """ - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - :keyword connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :paramtype connected_i_pv4_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword connected_i_pv6_subnets: List of connected IPv6 Subnets. - :paramtype connected_i_pv6_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword is_monitoring_enabled: To check whether monitoring of internal network is enabled or - not. Known values are: "True" and "False". - :paramtype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - """ - super().__init__(**kwargs) - self.mtu = mtu - self.connected_i_pv4_subnets = connected_i_pv4_subnets - self.connected_i_pv6_subnets = connected_i_pv6_subnets - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.is_monitoring_enabled = is_monitoring_enabled - - -class InternalNetworkPatchProperties(AnnotationResource, InternalNetworkPatchableProperties): - """InternalNetwork Patch properties. - - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. - :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. - Known values are: "True" and "False". - :vartype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar bgp_configuration: BGP configuration properties. - :vartype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpConfiguration - :ivar static_route_configuration: Static Route Configuration properties. - :vartype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "connected_i_pv4_subnets": {"min_items": 1}, - "connected_i_pv6_subnets": {"min_items": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "connected_i_pv4_subnets": {"key": "connectedIPv4Subnets", "type": "[ConnectedSubnet]"}, - "connected_i_pv6_subnets": {"key": "connectedIPv6Subnets", "type": "[ConnectedSubnet]"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - "is_monitoring_enabled": {"key": "isMonitoringEnabled", "type": "str"}, - "annotation": {"key": "annotation", "type": "str"}, - "bgp_configuration": {"key": "bgpConfiguration", "type": "BgpConfiguration"}, - "static_route_configuration": {"key": "staticRouteConfiguration", "type": "StaticRouteConfiguration"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - is_monitoring_enabled: Union[str, "_models.IsMonitoringEnabled"] = "False", - annotation: Optional[str] = None, - bgp_configuration: Optional["_models.BgpConfiguration"] = None, - static_route_configuration: Optional["_models.StaticRouteConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - :keyword connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :paramtype connected_i_pv4_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword connected_i_pv6_subnets: List of connected IPv6 Subnets. - :paramtype connected_i_pv6_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword is_monitoring_enabled: To check whether monitoring of internal network is enabled or - not. Known values are: "True" and "False". - :paramtype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword bgp_configuration: BGP configuration properties. - :paramtype bgp_configuration: ~azure.mgmt.managednetworkfabric.models.BgpConfiguration - :keyword static_route_configuration: Static Route Configuration properties. - :paramtype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.StaticRouteConfiguration - """ - super().__init__( - annotation=annotation, - mtu=mtu, - connected_i_pv4_subnets=connected_i_pv4_subnets, - connected_i_pv6_subnets=connected_i_pv6_subnets, - import_route_policy_id=import_route_policy_id, - export_route_policy_id=export_route_policy_id, - import_route_policy=import_route_policy, - export_route_policy=export_route_policy, - ingress_acl_id=ingress_acl_id, - egress_acl_id=egress_acl_id, - is_monitoring_enabled=is_monitoring_enabled, - **kwargs - ) - self.mtu = mtu - self.connected_i_pv4_subnets = connected_i_pv4_subnets - self.connected_i_pv6_subnets = connected_i_pv6_subnets - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.is_monitoring_enabled = is_monitoring_enabled - self.bgp_configuration = bgp_configuration - self.static_route_configuration = static_route_configuration - self.annotation = annotation - - -class InternalNetworkProperties(AnnotationResource, InternalNetworkPatchableProperties, ExtensionEnumProperty): - """Internal Network Properties defines the properties of the 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 server. - - :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :vartype connected_i_pv4_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar connected_i_pv6_subnets: List of connected IPv6 Subnets. - :vartype connected_i_pv6_subnets: list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :ivar import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype import_route_policy_id: str - :ivar export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the backward - compatibility. - :vartype export_route_policy_id: str - :ivar import_route_policy: Import Route Policy either IPv4 or IPv6. - :vartype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :ivar export_route_policy: Export Route Policy either IPv4 or IPv6. - :vartype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar is_monitoring_enabled: To check whether monitoring of internal network is enabled or not. - Known values are: "True" and "False". - :vartype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar vlan_id: Vlan identifier. Example: 1001. Required. - :vartype vlan_id: int - :ivar bgp_configuration: BGP configuration properties. - :vartype bgp_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration - :ivar static_route_configuration: Static Route Configuration properties. - :vartype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "connected_i_pv4_subnets": {"min_items": 1}, - "connected_i_pv6_subnets": {"min_items": 1}, - "vlan_id": {"required": True, "maximum": 4094, "minimum": 100}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "extension": {"key": "extension", "type": "str"}, - "mtu": {"key": "mtu", "type": "int"}, - "connected_i_pv4_subnets": {"key": "connectedIPv4Subnets", "type": "[ConnectedSubnet]"}, - "connected_i_pv6_subnets": {"key": "connectedIPv6Subnets", "type": "[ConnectedSubnet]"}, - "import_route_policy_id": {"key": "importRoutePolicyId", "type": "str"}, - "export_route_policy_id": {"key": "exportRoutePolicyId", "type": "str"}, - "import_route_policy": {"key": "importRoutePolicy", "type": "ImportRoutePolicy"}, - "export_route_policy": {"key": "exportRoutePolicy", "type": "ExportRoutePolicy"}, - "ingress_acl_id": {"key": "ingressAclId", "type": "str"}, - "egress_acl_id": {"key": "egressAclId", "type": "str"}, - "is_monitoring_enabled": {"key": "isMonitoringEnabled", "type": "str"}, - "annotation": {"key": "annotation", "type": "str"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "bgp_configuration": {"key": "bgpConfiguration", "type": "InternalNetworkPropertiesBgpConfiguration"}, - "static_route_configuration": { - "key": "staticRouteConfiguration", - "type": "InternalNetworkPropertiesStaticRouteConfiguration", - }, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - vlan_id: int, - extension: Union[str, "_models.Extension"] = "NoExtension", - mtu: int = 1500, - connected_i_pv4_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - connected_i_pv6_subnets: Optional[list["_models.ConnectedSubnet"]] = None, - import_route_policy_id: Optional[str] = None, - export_route_policy_id: Optional[str] = None, - import_route_policy: Optional["_models.ImportRoutePolicy"] = None, - export_route_policy: Optional["_models.ExportRoutePolicy"] = None, - ingress_acl_id: Optional[str] = None, - egress_acl_id: Optional[str] = None, - is_monitoring_enabled: Union[str, "_models.IsMonitoringEnabled"] = "False", - annotation: Optional[str] = None, - bgp_configuration: Optional["_models.InternalNetworkPropertiesBgpConfiguration"] = None, - static_route_configuration: Optional["_models.InternalNetworkPropertiesStaticRouteConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :paramtype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - :keyword connected_i_pv4_subnets: List of Connected IPv4 Subnets. - :paramtype connected_i_pv4_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword connected_i_pv6_subnets: List of connected IPv6 Subnets. - :paramtype connected_i_pv6_subnets: - list[~azure.mgmt.managednetworkfabric.models.ConnectedSubnet] - :keyword import_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype import_route_policy_id: str - :keyword export_route_policy_id: ARM Resource ID of the RoutePolicy. This is used for the - backward compatibility. - :paramtype export_route_policy_id: str - :keyword import_route_policy: Import Route Policy either IPv4 or IPv6. - :paramtype import_route_policy: ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicy - :keyword export_route_policy: Export Route Policy either IPv4 or IPv6. - :paramtype export_route_policy: ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicy - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword is_monitoring_enabled: To check whether monitoring of internal network is enabled or - not. Known values are: "True" and "False". - :paramtype is_monitoring_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsMonitoringEnabled - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword vlan_id: Vlan identifier. Example: 1001. Required. - :paramtype vlan_id: int - :keyword bgp_configuration: BGP configuration properties. - :paramtype bgp_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration - :keyword static_route_configuration: Static Route Configuration properties. - :paramtype static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration - """ - super().__init__( - annotation=annotation, - mtu=mtu, - connected_i_pv4_subnets=connected_i_pv4_subnets, - connected_i_pv6_subnets=connected_i_pv6_subnets, - import_route_policy_id=import_route_policy_id, - export_route_policy_id=export_route_policy_id, - import_route_policy=import_route_policy, - export_route_policy=export_route_policy, - ingress_acl_id=ingress_acl_id, - egress_acl_id=egress_acl_id, - is_monitoring_enabled=is_monitoring_enabled, - extension=extension, - **kwargs - ) - self.extension = extension - self.mtu = mtu - self.connected_i_pv4_subnets = connected_i_pv4_subnets - self.connected_i_pv6_subnets = connected_i_pv6_subnets - self.import_route_policy_id = import_route_policy_id - self.export_route_policy_id = export_route_policy_id - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.ingress_acl_id = ingress_acl_id - self.egress_acl_id = egress_acl_id - self.is_monitoring_enabled = is_monitoring_enabled - self.vlan_id = vlan_id - self.bgp_configuration = bgp_configuration - self.static_route_configuration = static_route_configuration - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class InternalNetworkPropertiesBgpConfiguration(BgpConfiguration): # pylint: disable=name-too-long - """BGP configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar default_route_originate: Originate a defaultRoute. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype default_route_originate: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :ivar allow_as: Allows for routes to be received and processed even if the router detects its - own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. - :vartype allow_as: int - :ivar allow_as_override: Enable Or Disable state. Known values are: "Enable" and "Disable". - :vartype allow_as_override: str or ~azure.mgmt.managednetworkfabric.models.AllowASOverride - :ivar fabric_asn: ASN of Network Fabric. Example: 65048. - :vartype fabric_asn: int - :ivar peer_asn: Peer ASN. Example: 65047. - :vartype peer_asn: int - :ivar ipv4_listen_range_prefixes: List of BGP IPv4 Listen Range prefixes. - :vartype ipv4_listen_range_prefixes: list[str] - :ivar ipv6_listen_range_prefixes: List of BGP IPv6 Listen Ranges prefixes. - :vartype ipv6_listen_range_prefixes: list[str] - :ivar ipv4_neighbor_address: List with stringified IPv4 Neighbor Addresses. - :vartype ipv4_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - :ivar ipv6_neighbor_address: List with stringified IPv6 Neighbor Address. - :vartype ipv6_neighbor_address: list[~azure.mgmt.managednetworkfabric.models.NeighborAddress] - """ - - -class StaticRouteConfiguration(_serialization.Model): - """Static Route Configuration properties. - - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ipv4_routes: List of IPv4 Routes. - :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :ivar ipv6_routes: List of IPv6 Routes. - :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - - _validation = { - "ipv4_routes": {"min_items": 1}, - "ipv6_routes": {"min_items": 1}, - } - - _attribute_map = { - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ipv4_routes": {"key": "ipv4Routes", "type": "[StaticRouteProperties]"}, - "ipv6_routes": {"key": "ipv6Routes", "type": "[StaticRouteProperties]"}, - } - - def __init__( - self, - *, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ipv4_routes: List of IPv4 Routes. - :paramtype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :keyword ipv6_routes: List of IPv6 Routes. - :paramtype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - super().__init__(**kwargs) - self.bfd_configuration = bfd_configuration - self.ipv4_routes = ipv4_routes - self.ipv6_routes = ipv6_routes - - -class InternalNetworkPropertiesStaticRouteConfiguration( - StaticRouteConfiguration, ExtensionEnumProperty -): # pylint: disable=name-too-long - """Static Route Configuration properties. - - :ivar extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :vartype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :ivar bfd_configuration: BFD configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ipv4_routes: List of IPv4 Routes. - :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :ivar ipv6_routes: List of IPv6 Routes. - :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - - _validation = { - "ipv4_routes": {"min_items": 1}, - "ipv6_routes": {"min_items": 1}, - } - - _attribute_map = { - "extension": {"key": "extension", "type": "str"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ipv4_routes": {"key": "ipv4Routes", "type": "[StaticRouteProperties]"}, - "ipv6_routes": {"key": "ipv6Routes", "type": "[StaticRouteProperties]"}, - } - - def __init__( - self, - *, - extension: Union[str, "_models.Extension"] = "NoExtension", - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword extension: Extension. Example: NoExtension | NPB. Known values are: "NoExtension" and - "NPB". - :paramtype extension: str or ~azure.mgmt.managednetworkfabric.models.Extension - :keyword bfd_configuration: BFD configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ipv4_routes: List of IPv4 Routes. - :paramtype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :keyword ipv6_routes: List of IPv6 Routes. - :paramtype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - super().__init__( - bfd_configuration=bfd_configuration, - ipv4_routes=ipv4_routes, - ipv6_routes=ipv6_routes, - extension=extension, - **kwargs - ) - self.extension = extension - self.bfd_configuration = bfd_configuration - self.ipv4_routes = ipv4_routes - self.ipv6_routes = ipv6_routes - - -class InternalNetworksList(_serialization.Model): - """List of Internal Networks. - - :ivar value: List of Internal Network resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[InternalNetwork]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.InternalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of Internal Network resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class InternetGateway(TrackedResource): - """The Internet Gateway resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :vartype internet_gateway_rule_id: str - :ivar ipv4_address: IPv4 Address of Internet Gateway. - :vartype ipv4_address: str - :ivar port: Port number of Internet Gateway. - :vartype port: int - :ivar type_properties_type: Gateway Type of the resource. Required. Known values are: - "Infrastructure" and "Workload". - :vartype type_properties_type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType - :ivar network_fabric_controller_id: ARM Resource ID of the Network Fabric Controller. Required. - :vartype network_fabric_controller_id: str - :ivar provisioning_state: Provisioning state of resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "ipv4_address": {"readonly": True}, - "port": {"readonly": True}, - "type_properties_type": {"required": True}, - "network_fabric_controller_id": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "internet_gateway_rule_id": {"key": "properties.internetGatewayRuleId", "type": "str"}, - "ipv4_address": {"key": "properties.ipv4Address", "type": "str"}, - "port": {"key": "properties.port", "type": "int"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "network_fabric_controller_id": {"key": "properties.networkFabricControllerId", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - type_properties_type: Union[str, "_models.GatewayType"], - network_fabric_controller_id: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - internet_gateway_rule_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :paramtype internet_gateway_rule_id: str - :keyword type_properties_type: Gateway Type of the resource. Required. Known values are: - "Infrastructure" and "Workload". - :paramtype type_properties_type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType - :keyword network_fabric_controller_id: ARM Resource ID of the Network Fabric Controller. - Required. - :paramtype network_fabric_controller_id: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.internet_gateway_rule_id = internet_gateway_rule_id - self.ipv4_address: Optional[str] = None - self.port: Optional[int] = None - self.type_properties_type = type_properties_type - self.network_fabric_controller_id = network_fabric_controller_id - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class InternetGatewayPatch(TagsUpdate): - """The Internet Gateway patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :vartype internet_gateway_rule_id: str - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "internet_gateway_rule_id": {"key": "properties.internetGatewayRuleId", "type": "str"}, - } - - def __init__( - self, *, tags: Optional[dict[str, str]] = None, internet_gateway_rule_id: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :paramtype internet_gateway_rule_id: str - """ - super().__init__(tags=tags, **kwargs) - self.internet_gateway_rule_id = internet_gateway_rule_id - - -class InternetGatewayPatchableProperties(_serialization.Model): - """Internet Gateway Patchable Properties defines the patchable properties of the resource. - - :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :vartype internet_gateway_rule_id: str - """ - - _attribute_map = { - "internet_gateway_rule_id": {"key": "internetGatewayRuleId", "type": "str"}, - } - - def __init__(self, *, internet_gateway_rule_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :paramtype internet_gateway_rule_id: str - """ - super().__init__(**kwargs) - self.internet_gateway_rule_id = internet_gateway_rule_id - - -class InternetGatewayProperties(AnnotationResource, InternetGatewayPatchableProperties): - """Internet Gateway Properties defines the properties of the 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 server. - - :ivar internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :vartype internet_gateway_rule_id: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ipv4_address: IPv4 Address of Internet Gateway. - :vartype ipv4_address: str - :ivar port: Port number of Internet Gateway. - :vartype port: int - :ivar type: Gateway Type of the resource. Required. Known values are: "Infrastructure" and - "Workload". - :vartype type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType - :ivar network_fabric_controller_id: ARM Resource ID of the Network Fabric Controller. Required. - :vartype network_fabric_controller_id: str - :ivar provisioning_state: Provisioning state of resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "ipv4_address": {"readonly": True}, - "port": {"readonly": True}, - "type": {"required": True}, - "network_fabric_controller_id": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "internet_gateway_rule_id": {"key": "internetGatewayRuleId", "type": "str"}, - "annotation": {"key": "annotation", "type": "str"}, - "ipv4_address": {"key": "ipv4Address", "type": "str"}, - "port": {"key": "port", "type": "int"}, - "type": {"key": "type", "type": "str"}, - "network_fabric_controller_id": {"key": "networkFabricControllerId", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.GatewayType"], - network_fabric_controller_id: str, - internet_gateway_rule_id: Optional[str] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword internet_gateway_rule_id: ARM Resource ID of the Internet Gateway Rule. - :paramtype internet_gateway_rule_id: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword type: Gateway Type of the resource. Required. Known values are: "Infrastructure" and - "Workload". - :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.GatewayType - :keyword network_fabric_controller_id: ARM Resource ID of the Network Fabric Controller. - Required. - :paramtype network_fabric_controller_id: str - """ - super().__init__(annotation=annotation, internet_gateway_rule_id=internet_gateway_rule_id, **kwargs) - self.internet_gateway_rule_id = internet_gateway_rule_id - self.ipv4_address: Optional[str] = None - self.port: Optional[int] = None - self.type = type - self.network_fabric_controller_id = network_fabric_controller_id - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.annotation = annotation - - -class InternetGatewayRule(TrackedResource): - """The Internet Gateway Rule resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar rule_properties: Rules for the InternetGateways. Required. - :vartype rule_properties: ~azure.mgmt.managednetworkfabric.models.RuleProperties - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar internet_gateway_ids: List of Internet Gateway resource Id. - :vartype internet_gateway_ids: list[str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "rule_properties": {"required": True}, - "provisioning_state": {"readonly": True}, - "internet_gateway_ids": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "rule_properties": {"key": "properties.ruleProperties", "type": "RuleProperties"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "internet_gateway_ids": {"key": "properties.internetGatewayIds", "type": "[str]"}, - } - - def __init__( - self, - *, - location: str, - rule_properties: "_models.RuleProperties", - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword rule_properties: Rules for the InternetGateways. Required. - :paramtype rule_properties: ~azure.mgmt.managednetworkfabric.models.RuleProperties - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.rule_properties = rule_properties - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.internet_gateway_ids: Optional[list[str]] = None - - -class InternetGatewayRulePatch(TagsUpdate): - """The Internet Gateway Rules patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - -class InternetGatewayRuleProperties(AnnotationResource): - """Internet Gateway Rule Properties defines the resource 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 server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar rule_properties: Rules for the InternetGateways. Required. - :vartype rule_properties: ~azure.mgmt.managednetworkfabric.models.RuleProperties - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar internet_gateway_ids: List of Internet Gateway resource Id. - :vartype internet_gateway_ids: list[str] - """ - - _validation = { - "rule_properties": {"required": True}, - "provisioning_state": {"readonly": True}, - "internet_gateway_ids": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "rule_properties": {"key": "ruleProperties", "type": "RuleProperties"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "internet_gateway_ids": {"key": "internetGatewayIds", "type": "[str]"}, - } - - def __init__( - self, *, rule_properties: "_models.RuleProperties", annotation: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword rule_properties: Rules for the InternetGateways. Required. - :paramtype rule_properties: ~azure.mgmt.managednetworkfabric.models.RuleProperties - """ - super().__init__(annotation=annotation, **kwargs) - self.rule_properties = rule_properties - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.internet_gateway_ids: Optional[list[str]] = None - - -class InternetGatewayRulesListResult(_serialization.Model): - """List of Internet Gateway Rules. - - :ivar value: List of Internet Gateway Rule resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[InternetGatewayRule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.InternetGatewayRule"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of Internet Gateway Rule resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class InternetGatewaysListResult(_serialization.Model): - """List of InternetGateways. - - :ivar value: Displays list of Internet Gateway resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[InternetGateway]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.InternetGateway"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: Displays list of Internet Gateway resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IpCommunitiesListResult(_serialization.Model): - """List of IP Communities. - - :ivar value: List of IP Community resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[IpCommunity]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.IpCommunity"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of IP Community resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IpCommunity(TrackedResource): - """The IP Community resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ip_community_rules: List of IP Community Rules. - :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "ip_community_rules": {"key": "properties.ipCommunityRules", "type": "[IpCommunityRule]"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword ip_community_rules: List of IP Community Rules. - :paramtype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.ip_community_rules = ip_community_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class IpCommunityIdList(_serialization.Model): - """IP Community ID list properties. - - :ivar ip_community_ids: List of IP Community resource IDs. - :vartype ip_community_ids: list[str] - """ - - _attribute_map = { - "ip_community_ids": {"key": "ipCommunityIds", "type": "[str]"}, - } - - def __init__(self, *, ip_community_ids: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword ip_community_ids: List of IP Community resource IDs. - :paramtype ip_community_ids: list[str] - """ - super().__init__(**kwargs) - self.ip_community_ids = ip_community_ids - - -class IpCommunityPatch(TagsUpdate): - """The IP Community patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar ip_community_rules: List of IP Community Rules. - :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "ip_community_rules": {"key": "properties.ipCommunityRules", "type": "[IpCommunityRule]"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword ip_community_rules: List of IP Community Rules. - :paramtype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - """ - super().__init__(tags=tags, **kwargs) - self.ip_community_rules = ip_community_rules - - -class IpCommunityPatchableProperties(_serialization.Model): - """IP Community patchable properties. - - :ivar ip_community_rules: List of IP Community Rules. - :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - """ - - _attribute_map = { - "ip_community_rules": {"key": "ipCommunityRules", "type": "[IpCommunityRule]"}, - } - - def __init__(self, *, ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, **kwargs: Any) -> None: - """ - :keyword ip_community_rules: List of IP Community Rules. - :paramtype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - """ - super().__init__(**kwargs) - self.ip_community_rules = ip_community_rules - - -class IpCommunityProperties(AnnotationResource, IpCommunityPatchableProperties): - """IP Community Properties defines the resource properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar ip_community_rules: List of IP Community Rules. - :vartype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "ip_community_rules": {"key": "ipCommunityRules", "type": "[IpCommunityRule]"}, - "annotation": {"key": "annotation", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - ip_community_rules: Optional[list["_models.IpCommunityRule"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_community_rules: List of IP Community Rules. - :paramtype ip_community_rules: list[~azure.mgmt.managednetworkfabric.models.IpCommunityRule] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, ip_community_rules=ip_community_rules, **kwargs) - self.ip_community_rules = ip_community_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class IpCommunityRule(_serialization.Model): - """IP Community patchable properties. - - All required parameters must be populated in order to send to server. - - :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known - values are: "Permit" and "Deny". - :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :vartype sequence_number: int - :ivar well_known_communities: Supported well known Community List. - :vartype well_known_communities: list[str or - ~azure.mgmt.managednetworkfabric.models.WellKnownCommunities] - :ivar community_members: List the community members of IP Community. Required. - :vartype community_members: list[str] - """ - - _validation = { - "action": {"required": True}, - "sequence_number": {"required": True, "maximum": 4294967295, "minimum": 1}, - "well_known_communities": {"unique": True}, - "community_members": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "action": {"key": "action", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "well_known_communities": {"key": "wellKnownCommunities", "type": "[str]"}, - "community_members": {"key": "communityMembers", "type": "[str]"}, - } - - def __init__( - self, - *, - action: Union[str, "_models.CommunityActionTypes"], - sequence_number: int, - community_members: list[str], - well_known_communities: Optional[list[Union[str, "_models.WellKnownCommunities"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword action: Action to be taken on the configuration. Example: Permit | Deny. Required. - Known values are: "Permit" and "Deny". - :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :paramtype sequence_number: int - :keyword well_known_communities: Supported well known Community List. - :paramtype well_known_communities: list[str or - ~azure.mgmt.managednetworkfabric.models.WellKnownCommunities] - :keyword community_members: List the community members of IP Community. Required. - :paramtype community_members: list[str] - """ - super().__init__(**kwargs) - self.action = action - self.sequence_number = sequence_number - self.well_known_communities = well_known_communities - self.community_members = community_members - - -class IpExtendedCommunity(TrackedResource): - """The IP Extended Community resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. - :vartype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "ip_extended_community_rules": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "ip_extended_community_rules": { - "key": "properties.ipExtendedCommunityRules", - "type": "[IpExtendedCommunityRule]", - }, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword ip_extended_community_rules: List of IP Extended Community Rules. Required. - :paramtype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.ip_extended_community_rules = ip_extended_community_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class IpExtendedCommunityIdList(_serialization.Model): - """IP Extended Community Id list properties. - - :ivar ip_extended_community_ids: List of IP Extended Community resource IDs. - :vartype ip_extended_community_ids: list[str] - """ - - _attribute_map = { - "ip_extended_community_ids": {"key": "ipExtendedCommunityIds", "type": "[str]"}, - } - - def __init__(self, *, ip_extended_community_ids: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword ip_extended_community_ids: List of IP Extended Community resource IDs. - :paramtype ip_extended_community_ids: list[str] - """ - super().__init__(**kwargs) - self.ip_extended_community_ids = ip_extended_community_ids - - -class IpExtendedCommunityListResult(_serialization.Model): - """List of IP Extended Communities. - - :ivar value: List of IP Extended Communities resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[IpExtendedCommunity]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.IpExtendedCommunity"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of IP Extended Communities resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IpExtendedCommunityPatch(TagsUpdate): - """The IP Extended Communities patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar ip_extended_community_rules: List of IP Extended Community Rules. - :vartype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "ip_extended_community_rules": { - "key": "properties.ipExtendedCommunityRules", - "type": "[IpExtendedCommunityRule]", - }, - "annotation": {"key": "properties.annotation", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - ip_extended_community_rules: Optional[list["_models.IpExtendedCommunityRule"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword ip_extended_community_rules: List of IP Extended Community Rules. - :paramtype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(tags=tags, **kwargs) - self.ip_extended_community_rules = ip_extended_community_rules - self.annotation = annotation - - -class IpExtendedCommunityPatchableProperties(_serialization.Model): - """IP Extended Community patchable properties. - - All required parameters must be populated in order to send to server. - - :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. - :vartype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - """ - - _validation = { - "ip_extended_community_rules": {"required": True}, - } - - _attribute_map = { - "ip_extended_community_rules": {"key": "ipExtendedCommunityRules", "type": "[IpExtendedCommunityRule]"}, - } - - def __init__(self, *, ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], **kwargs: Any) -> None: - """ - :keyword ip_extended_community_rules: List of IP Extended Community Rules. Required. - :paramtype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - """ - super().__init__(**kwargs) - self.ip_extended_community_rules = ip_extended_community_rules - - -class IpExtendedCommunityPatchProperties(IpExtendedCommunityPatchableProperties, AnnotationResource): - """IP Extended Community patchable properties. - - All required parameters must be populated in order to send to server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. - :vartype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - """ - - _validation = { - "ip_extended_community_rules": {"required": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "ip_extended_community_rules": {"key": "ipExtendedCommunityRules", "type": "[IpExtendedCommunityRule]"}, - } - - def __init__( - self, - *, - ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword ip_extended_community_rules: List of IP Extended Community Rules. Required. - :paramtype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - """ - super().__init__(ip_extended_community_rules=ip_extended_community_rules, annotation=annotation, **kwargs) - self.annotation = annotation - self.ip_extended_community_rules = ip_extended_community_rules - - -class IpExtendedCommunityProperties(AnnotationResource, IpExtendedCommunityPatchableProperties): - """IP Extended Community Properties defines the resource 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 server. - - :ivar ip_extended_community_rules: List of IP Extended Community Rules. Required. - :vartype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "ip_extended_community_rules": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "ip_extended_community_rules": {"key": "ipExtendedCommunityRules", "type": "[IpExtendedCommunityRule]"}, - "annotation": {"key": "annotation", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - ip_extended_community_rules: list["_models.IpExtendedCommunityRule"], - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_extended_community_rules: List of IP Extended Community Rules. Required. - :paramtype ip_extended_community_rules: - list[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityRule] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, ip_extended_community_rules=ip_extended_community_rules, **kwargs) - self.ip_extended_community_rules = ip_extended_community_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class IpExtendedCommunityRule(_serialization.Model): - """List of IP Extended Community Rules. - - All required parameters must be populated in order to send to server. - - :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known - values are: "Permit" and "Deny". - :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :vartype sequence_number: int - :ivar route_targets: Route Target List.The expected formats are ASN(plain):NN >> example - 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example - 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in - range of 0-4294967295. Required. - :vartype route_targets: list[str] - """ - - _validation = { - "action": {"required": True}, - "sequence_number": {"required": True, "maximum": 4294967295, "minimum": 1}, - "route_targets": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "action": {"key": "action", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "route_targets": {"key": "routeTargets", "type": "[str]"}, - } - - def __init__( - self, - *, - action: Union[str, "_models.CommunityActionTypes"], - sequence_number: int, - route_targets: list[str], - **kwargs: Any - ) -> None: - """ - :keyword action: Action to be taken on the configuration. Example: Permit | Deny. Required. - Known values are: "Permit" and "Deny". - :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :paramtype sequence_number: int - :keyword route_targets: Route Target List.The expected formats are ASN(plain):NN >> example - 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example - 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in - range of 0-4294967295. Required. - :paramtype route_targets: list[str] - """ - super().__init__(**kwargs) - self.action = action - self.sequence_number = sequence_number - self.route_targets = route_targets - - -class IpGroupProperties(_serialization.Model): - """IP Group properties. - - :ivar name: IP Group name. - :vartype name: str - :ivar ip_address_type: IP Address type. Known values are: "IPv4" and "IPv6". - :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :ivar ip_prefixes: List of IP Prefixes. - :vartype ip_prefixes: list[str] - """ - - _validation = { - "name": {"min_length": 1}, - "ip_prefixes": {"min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "ip_address_type": {"key": "ipAddressType", "type": "str"}, - "ip_prefixes": {"key": "ipPrefixes", "type": "[str]"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - ip_prefixes: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: IP Group name. - :paramtype name: str - :keyword ip_address_type: IP Address type. Known values are: "IPv4" and "IPv6". - :paramtype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :keyword ip_prefixes: List of IP Prefixes. - :paramtype ip_prefixes: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.ip_address_type = ip_address_type - self.ip_prefixes = ip_prefixes - - -class IpMatchCondition(_serialization.Model): - """Defines the condition that can be filtered using the selected IPs. - - :ivar type: IP Address type that needs to be matched. Known values are: "SourceIP" and - "DestinationIP". - :vartype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType - :ivar prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and - "LongestPrefix". - :vartype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType - :ivar ip_prefix_values: The list of IP Prefixes that need to be matched. - :vartype ip_prefix_values: list[str] - :ivar ip_group_names: The List of IP Group Names that need to be matched. - :vartype ip_group_names: list[str] - """ - - _validation = { - "ip_prefix_values": {"min_items": 1}, - "ip_group_names": {"min_items": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "prefix_type": {"key": "prefixType", "type": "str"}, - "ip_prefix_values": {"key": "ipPrefixValues", "type": "[str]"}, - "ip_group_names": {"key": "ipGroupNames", "type": "[str]"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.SourceDestinationType"]] = None, - prefix_type: Optional[Union[str, "_models.PrefixType"]] = None, - ip_prefix_values: Optional[list[str]] = None, - ip_group_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: IP Address type that needs to be matched. Known values are: "SourceIP" and - "DestinationIP". - :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.SourceDestinationType - :keyword prefix_type: IP Prefix Type that needs to be matched. Known values are: "Prefix" and - "LongestPrefix". - :paramtype prefix_type: str or ~azure.mgmt.managednetworkfabric.models.PrefixType - :keyword ip_prefix_values: The list of IP Prefixes that need to be matched. - :paramtype ip_prefix_values: list[str] - :keyword ip_group_names: The List of IP Group Names that need to be matched. - :paramtype ip_group_names: list[str] - """ - super().__init__(**kwargs) - self.type = type - self.prefix_type = prefix_type - self.ip_prefix_values = ip_prefix_values - self.ip_group_names = ip_group_names - - -class IpPrefix(TrackedResource): - """The IP Prefix resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ip_prefix_rules: The list of IP Prefix Rules. - :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "ip_prefix_rules": {"key": "properties.ipPrefixRules", "type": "[IpPrefixRule]"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword ip_prefix_rules: The list of IP Prefix Rules. - :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.ip_prefix_rules = ip_prefix_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class IpPrefixesListResult(_serialization.Model): - """List of IP Prefixes. - - :ivar value: List of IP Prefix resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[IpPrefix]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.IpPrefix"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of IP Prefix resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IpPrefixPatch(TagsUpdate): - """The IP Prefix patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar ip_prefix_rules: The list of IP Prefix Rules. - :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "ip_prefix_rules": {"key": "properties.ipPrefixRules", "type": "[IpPrefixRule]"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword ip_prefix_rules: The list of IP Prefix Rules. - :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.ip_prefix_rules = ip_prefix_rules - - -class IpPrefixPatchableProperties(_serialization.Model): - """IP Prefix patchable properties. - - :ivar ip_prefix_rules: The list of IP Prefix Rules. - :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - """ - - _attribute_map = { - "ip_prefix_rules": {"key": "ipPrefixRules", "type": "[IpPrefixRule]"}, - } - - def __init__(self, *, ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, **kwargs: Any) -> None: - """ - :keyword ip_prefix_rules: The list of IP Prefix Rules. - :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - """ - super().__init__(**kwargs) - self.ip_prefix_rules = ip_prefix_rules - - -class IpPrefixPatchProperties(AnnotationResource, IpPrefixPatchableProperties): - """IP Prefix patchable properties. - - :ivar ip_prefix_rules: The list of IP Prefix Rules. - :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "ip_prefix_rules": {"key": "ipPrefixRules", "type": "[IpPrefixRule]"}, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_prefix_rules: The list of IP Prefix Rules. - :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, ip_prefix_rules=ip_prefix_rules, **kwargs) - self.ip_prefix_rules = ip_prefix_rules - self.annotation = annotation - - -class IpPrefixProperties(AnnotationResource, IpPrefixPatchableProperties): - """IP Prefix Properties defines the properties of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar ip_prefix_rules: The list of IP Prefix Rules. - :vartype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "ip_prefix_rules": {"key": "ipPrefixRules", "type": "[IpPrefixRule]"}, - "annotation": {"key": "annotation", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - ip_prefix_rules: Optional[list["_models.IpPrefixRule"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_prefix_rules: The list of IP Prefix Rules. - :paramtype ip_prefix_rules: list[~azure.mgmt.managednetworkfabric.models.IpPrefixRule] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, ip_prefix_rules=ip_prefix_rules, **kwargs) - self.ip_prefix_rules = ip_prefix_rules - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class IpPrefixRule(_serialization.Model): - """IP Prefix Rule properties. - - All required parameters must be populated in order to send to server. - - :ivar action: Action to be taken on the configuration. Example: Permit | Deny. Required. Known - values are: "Permit" and "Deny". - :vartype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :vartype sequence_number: int - :ivar network_prefix: Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. - Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. Required. - :vartype network_prefix: str - :ivar condition: Specify prefix-list bounds. Known values are: "EqualTo", - "GreaterThanOrEqualTo", "LesserThanOrEqualTo", and "Range". - :vartype condition: str or ~azure.mgmt.managednetworkfabric.models.Condition - :ivar subnet_mask_length: SubnetMaskLength gives the minimum NetworkPrefix length to be - matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. - :vartype subnet_mask_length: str - """ - - _validation = { - "action": {"required": True}, - "sequence_number": {"required": True, "maximum": 4294967295, "minimum": 1}, - "network_prefix": {"required": True}, - } - - _attribute_map = { - "action": {"key": "action", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "network_prefix": {"key": "networkPrefix", "type": "str"}, - "condition": {"key": "condition", "type": "str"}, - "subnet_mask_length": {"key": "subnetMaskLength", "type": "str"}, - } - - def __init__( - self, - *, - action: Union[str, "_models.CommunityActionTypes"], - sequence_number: int, - network_prefix: str, - condition: Optional[Union[str, "_models.Condition"]] = None, - subnet_mask_length: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword action: Action to be taken on the configuration. Example: Permit | Deny. Required. - Known values are: "Permit" and "Deny". - :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword sequence_number: Sequence to insert to/delete from existing route. Prefix lists are - evaluated starting with the lowest sequence number and continue down the list until a match is - made. Once a match is made, the permit or deny statement is applied to that network and the - rest of the list is ignored. Required. - :paramtype sequence_number: int - :keyword network_prefix: Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. - Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. Required. - :paramtype network_prefix: str - :keyword condition: Specify prefix-list bounds. Known values are: "EqualTo", - "GreaterThanOrEqualTo", "LesserThanOrEqualTo", and "Range". - :paramtype condition: str or ~azure.mgmt.managednetworkfabric.models.Condition - :keyword subnet_mask_length: SubnetMaskLength gives the minimum NetworkPrefix length to be - matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. - :paramtype subnet_mask_length: str - """ - super().__init__(**kwargs) - self.action = action - self.sequence_number = sequence_number - self.network_prefix = network_prefix - self.condition = condition - self.subnet_mask_length = subnet_mask_length - - -class IsolationDomainProperties(_serialization.Model): - """Isolation Domain Properties. - - :ivar encapsulation: Type of encapsulation. Known values are: "None" and "GRE". - :vartype encapsulation: str or ~azure.mgmt.managednetworkfabric.models.Encapsulation - :ivar neighbor_group_ids: List of Neighbor Group IDs. - :vartype neighbor_group_ids: list[str] - """ - - _attribute_map = { - "encapsulation": {"key": "encapsulation", "type": "str"}, - "neighbor_group_ids": {"key": "neighborGroupIds", "type": "[str]"}, - } - - def __init__( - self, - *, - encapsulation: Optional[Union[str, "_models.Encapsulation"]] = None, - neighbor_group_ids: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword encapsulation: Type of encapsulation. Known values are: "None" and "GRE". - :paramtype encapsulation: str or ~azure.mgmt.managednetworkfabric.models.Encapsulation - :keyword neighbor_group_ids: List of Neighbor Group IDs. - :paramtype neighbor_group_ids: list[str] - """ - super().__init__(**kwargs) - self.encapsulation = encapsulation - self.neighbor_group_ids = neighbor_group_ids - - -class L2IsolationDomain(TrackedResource): - """The L2 Isolation Domain resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar vlan_id: Vlan Identifier of the Network Fabric. Example: 501. Required. - :vartype vlan_id: int - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_id": {"required": True}, - "vlan_id": {"required": True, "maximum": 4094, "minimum": 100}, - "mtu": {"maximum": 9200, "minimum": 64}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, - "vlan_id": {"key": "properties.vlanId", "type": "int"}, - "mtu": {"key": "properties.mtu", "type": "int"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_fabric_id: str, - vlan_id: int, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - mtu: int = 1500, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - :keyword vlan_id: Vlan Identifier of the Network Fabric. Example: 501. Required. - :paramtype vlan_id: int - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.network_fabric_id = network_fabric_id - self.vlan_id = vlan_id - self.mtu = mtu - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class L2IsolationDomainPatch(TagsUpdate): - """The L2 Isolation Domain patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "mtu": {"key": "properties.mtu", "type": "int"}, - } - - def __init__( - self, *, tags: Optional[dict[str, str]] = None, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.mtu = mtu - - -class L2IsolationDomainPatchProperties(AnnotationResource): - """L2 Isolation Domain Patch Properties defines the patchable properties of the resource. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "mtu": {"key": "mtu", "type": "int"}, - } - - def __init__(self, *, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - """ - super().__init__(annotation=annotation, **kwargs) - self.mtu = mtu - - -class L2IsolationDomainProperties(AnnotationResource): - """L2Isolation Domain Properties defines the properties of the 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 server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar vlan_id: Vlan Identifier of the Network Fabric. Example: 501. Required. - :vartype vlan_id: int - :ivar mtu: Maximum transmission unit. Default value is 1500. - :vartype mtu: int - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "network_fabric_id": {"required": True}, - "vlan_id": {"required": True, "maximum": 4094, "minimum": 100}, - "mtu": {"maximum": 9200, "minimum": 64}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "network_fabric_id": {"key": "networkFabricId", "type": "str"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "mtu": {"key": "mtu", "type": "int"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, *, network_fabric_id: str, vlan_id: int, annotation: Optional[str] = None, mtu: int = 1500, **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - :keyword vlan_id: Vlan Identifier of the Network Fabric. Example: 501. Required. - :paramtype vlan_id: int - :keyword mtu: Maximum transmission unit. Default value is 1500. - :paramtype mtu: int - """ - super().__init__(annotation=annotation, **kwargs) - self.network_fabric_id = network_fabric_id - self.vlan_id = vlan_id - self.mtu = mtu - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class L2IsolationDomainsListResult(_serialization.Model): - """List of L2 Isolation Domains. - - :ivar value: Displays list of L2 Isolation Domain resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[L2IsolationDomain]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.L2IsolationDomain"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: Displays list of L2 Isolation Domain resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class L3ExportRoutePolicy(_serialization.Model): - """Array of ARM Resource ID of the RoutePolicies. - - :ivar export_ipv4_route_policy_id: ARM Resource ID of the RoutePolicy. - :vartype export_ipv4_route_policy_id: str - :ivar export_ipv6_route_policy_id: ARM Resource ID of the RoutePolicy. - :vartype export_ipv6_route_policy_id: str - """ - - _attribute_map = { - "export_ipv4_route_policy_id": {"key": "exportIpv4RoutePolicyId", "type": "str"}, - "export_ipv6_route_policy_id": {"key": "exportIpv6RoutePolicyId", "type": "str"}, - } - - def __init__( - self, - *, - export_ipv4_route_policy_id: Optional[str] = None, - export_ipv6_route_policy_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword export_ipv4_route_policy_id: ARM Resource ID of the RoutePolicy. - :paramtype export_ipv4_route_policy_id: str - :keyword export_ipv6_route_policy_id: ARM Resource ID of the RoutePolicy. - :paramtype export_ipv6_route_policy_id: str - """ - super().__init__(**kwargs) - self.export_ipv4_route_policy_id = export_ipv4_route_policy_id - self.export_ipv6_route_policy_id = export_ipv6_route_policy_id - - -class L3IsolationDomain(TrackedResource): - """The L3 Isolation Domain resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known - values are: "True" and "False". - :vartype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :ivar aggregate_route_configuration: Aggregate route configurations. - :vartype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. - :vartype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_id": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "redistribute_connected_subnets": {"key": "properties.redistributeConnectedSubnets", "type": "str"}, - "redistribute_static_routes": {"key": "properties.redistributeStaticRoutes", "type": "str"}, - "aggregate_route_configuration": { - "key": "properties.aggregateRouteConfiguration", - "type": "AggregateRouteConfiguration", - }, - "connected_subnet_route_policy": { - "key": "properties.connectedSubnetRoutePolicy", - "type": "ConnectedSubnetRoutePolicy", - }, - "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_fabric_id: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", - redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", - aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, - connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". - Known values are: "True" and "False". - :paramtype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :keyword redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known - values are: "True" and "False". - :paramtype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :keyword aggregate_route_configuration: Aggregate route configurations. - :paramtype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :keyword connected_subnet_route_policy: Connected Subnet RoutePolicy. - :paramtype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :keyword network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.redistribute_connected_subnets = redistribute_connected_subnets - self.redistribute_static_routes = redistribute_static_routes - self.aggregate_route_configuration = aggregate_route_configuration - self.connected_subnet_route_policy = connected_subnet_route_policy - self.network_fabric_id = network_fabric_id - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class L3IsolationDomainPatch(TagsUpdate): - """The L3 Isolation Domain patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known - values are: "True" and "False". - :vartype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :ivar aggregate_route_configuration: Aggregate route configurations. - :vartype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. - :vartype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "redistribute_connected_subnets": {"key": "properties.redistributeConnectedSubnets", "type": "str"}, - "redistribute_static_routes": {"key": "properties.redistributeStaticRoutes", "type": "str"}, - "aggregate_route_configuration": { - "key": "properties.aggregateRouteConfiguration", - "type": "AggregateRouteConfiguration", - }, - "connected_subnet_route_policy": { - "key": "properties.connectedSubnetRoutePolicy", - "type": "ConnectedSubnetRoutePolicy", - }, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", - redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", - aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, - connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". - Known values are: "True" and "False". - :paramtype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :keyword redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known - values are: "True" and "False". - :paramtype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :keyword aggregate_route_configuration: Aggregate route configurations. - :paramtype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :keyword connected_subnet_route_policy: Connected Subnet RoutePolicy. - :paramtype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.redistribute_connected_subnets = redistribute_connected_subnets - self.redistribute_static_routes = redistribute_static_routes - self.aggregate_route_configuration = aggregate_route_configuration - self.connected_subnet_route_policy = connected_subnet_route_policy - - -class L3IsolationDomainPatchableProperties(_serialization.Model): - """L3 Isolation Domain Patch Properties defines the patchable properties of the resource. - - :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known - values are: "True" and "False". - :vartype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :ivar aggregate_route_configuration: Aggregate route configurations. - :vartype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. - :vartype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - """ - - _attribute_map = { - "redistribute_connected_subnets": {"key": "redistributeConnectedSubnets", "type": "str"}, - "redistribute_static_routes": {"key": "redistributeStaticRoutes", "type": "str"}, - "aggregate_route_configuration": {"key": "aggregateRouteConfiguration", "type": "AggregateRouteConfiguration"}, - "connected_subnet_route_policy": {"key": "connectedSubnetRoutePolicy", "type": "ConnectedSubnetRoutePolicy"}, - } - - def __init__( - self, - *, - redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", - redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", - aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, - connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". - Known values are: "True" and "False". - :paramtype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :keyword redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known - values are: "True" and "False". - :paramtype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :keyword aggregate_route_configuration: Aggregate route configurations. - :paramtype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :keyword connected_subnet_route_policy: Connected Subnet RoutePolicy. - :paramtype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - """ - super().__init__(**kwargs) - self.redistribute_connected_subnets = redistribute_connected_subnets - self.redistribute_static_routes = redistribute_static_routes - self.aggregate_route_configuration = aggregate_route_configuration - self.connected_subnet_route_policy = connected_subnet_route_policy - - -class L3IsolationDomainPatchProperties(AnnotationResource, L3IsolationDomainPatchableProperties): - """Resource properties. - - :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known - values are: "True" and "False". - :vartype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :ivar aggregate_route_configuration: Aggregate route configurations. - :vartype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. - :vartype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "redistribute_connected_subnets": {"key": "redistributeConnectedSubnets", "type": "str"}, - "redistribute_static_routes": {"key": "redistributeStaticRoutes", "type": "str"}, - "aggregate_route_configuration": {"key": "aggregateRouteConfiguration", "type": "AggregateRouteConfiguration"}, - "connected_subnet_route_policy": {"key": "connectedSubnetRoutePolicy", "type": "ConnectedSubnetRoutePolicy"}, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", - redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", - aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, - connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". - Known values are: "True" and "False". - :paramtype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :keyword redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known - values are: "True" and "False". - :paramtype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :keyword aggregate_route_configuration: Aggregate route configurations. - :paramtype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :keyword connected_subnet_route_policy: Connected Subnet RoutePolicy. - :paramtype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__( - annotation=annotation, - redistribute_connected_subnets=redistribute_connected_subnets, - redistribute_static_routes=redistribute_static_routes, - aggregate_route_configuration=aggregate_route_configuration, - connected_subnet_route_policy=connected_subnet_route_policy, - **kwargs - ) - self.redistribute_connected_subnets = redistribute_connected_subnets - self.redistribute_static_routes = redistribute_static_routes - self.aggregate_route_configuration = aggregate_route_configuration - self.connected_subnet_route_policy = connected_subnet_route_policy - self.annotation = annotation - - -class L3IsolationDomainProperties(AnnotationResource, L3IsolationDomainPatchableProperties): - """L3 Isolation Domain Properties defines the properties of the 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 server. - - :ivar redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". Known - values are: "True" and "False". - :vartype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :ivar redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known values - are: "True" and "False". - :vartype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :ivar aggregate_route_configuration: Aggregate route configurations. - :vartype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :ivar connected_subnet_route_policy: Connected Subnet RoutePolicy. - :vartype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "network_fabric_id": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "redistribute_connected_subnets": {"key": "redistributeConnectedSubnets", "type": "str"}, - "redistribute_static_routes": {"key": "redistributeStaticRoutes", "type": "str"}, - "aggregate_route_configuration": {"key": "aggregateRouteConfiguration", "type": "AggregateRouteConfiguration"}, - "connected_subnet_route_policy": {"key": "connectedSubnetRoutePolicy", "type": "ConnectedSubnetRoutePolicy"}, - "annotation": {"key": "annotation", "type": "str"}, - "network_fabric_id": {"key": "networkFabricId", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - network_fabric_id: str, - redistribute_connected_subnets: Union[str, "_models.RedistributeConnectedSubnets"] = "True", - redistribute_static_routes: Union[str, "_models.RedistributeStaticRoutes"] = "False", - aggregate_route_configuration: Optional["_models.AggregateRouteConfiguration"] = None, - connected_subnet_route_policy: Optional["_models.ConnectedSubnetRoutePolicy"] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword redistribute_connected_subnets: Advertise Connected Subnets. Ex: "True" | "False". - Known values are: "True" and "False". - :paramtype redistribute_connected_subnets: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeConnectedSubnets - :keyword redistribute_static_routes: Advertise Static Routes. Ex: "True" | "False". Known - values are: "True" and "False". - :paramtype redistribute_static_routes: str or - ~azure.mgmt.managednetworkfabric.models.RedistributeStaticRoutes - :keyword aggregate_route_configuration: Aggregate route configurations. - :paramtype aggregate_route_configuration: - ~azure.mgmt.managednetworkfabric.models.AggregateRouteConfiguration - :keyword connected_subnet_route_policy: Connected Subnet RoutePolicy. - :paramtype connected_subnet_route_policy: - ~azure.mgmt.managednetworkfabric.models.ConnectedSubnetRoutePolicy - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_id: ARM Resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - """ - super().__init__( - annotation=annotation, - redistribute_connected_subnets=redistribute_connected_subnets, - redistribute_static_routes=redistribute_static_routes, - aggregate_route_configuration=aggregate_route_configuration, - connected_subnet_route_policy=connected_subnet_route_policy, - **kwargs - ) - self.redistribute_connected_subnets = redistribute_connected_subnets - self.redistribute_static_routes = redistribute_static_routes - self.aggregate_route_configuration = aggregate_route_configuration - self.connected_subnet_route_policy = connected_subnet_route_policy - self.network_fabric_id = network_fabric_id - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class L3IsolationDomainsListResult(_serialization.Model): - """List of L3 Isolation Domains. - - :ivar value: List of L3 Isolation Domain resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[L3IsolationDomain]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.L3IsolationDomain"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of L3 Isolation Domain resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class L3OptionBProperties(_serialization.Model): - """Option B configuration. - - :ivar import_route_targets: RouteTargets to be applied. This is used for the backward - compatibility. - :vartype import_route_targets: list[str] - :ivar export_route_targets: RouteTargets to be applied. This is used for the backward - compatibility. - :vartype export_route_targets: list[str] - :ivar route_targets: RouteTargets to be applied. - :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation - """ - - _attribute_map = { - "import_route_targets": {"key": "importRouteTargets", "type": "[str]"}, - "export_route_targets": {"key": "exportRouteTargets", "type": "[str]"}, - "route_targets": {"key": "routeTargets", "type": "RouteTargetInformation"}, - } - - def __init__( - self, - *, - import_route_targets: Optional[list[str]] = None, - export_route_targets: Optional[list[str]] = None, - route_targets: Optional["_models.RouteTargetInformation"] = None, - **kwargs: Any - ) -> None: - """ - :keyword import_route_targets: RouteTargets to be applied. This is used for the backward - compatibility. - :paramtype import_route_targets: list[str] - :keyword export_route_targets: RouteTargets to be applied. This is used for the backward - compatibility. - :paramtype export_route_targets: list[str] - :keyword route_targets: RouteTargets to be applied. - :paramtype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation - """ - super().__init__(**kwargs) - self.import_route_targets = import_route_targets - self.export_route_targets = export_route_targets - self.route_targets = route_targets - - -class Layer2Configuration(_serialization.Model): - """Common properties for Layer2 Configuration. - - :ivar mtu: MTU of the packets between PE & CE. - :vartype mtu: int - :ivar interfaces: List of network device interfaces resource IDs. - :vartype interfaces: list[str] - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "interfaces": {"min_items": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "interfaces": {"key": "interfaces", "type": "[str]"}, - } - - def __init__(self, *, mtu: int = 1500, interfaces: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword mtu: MTU of the packets between PE & CE. - :paramtype mtu: int - :keyword interfaces: List of network device interfaces resource IDs. - :paramtype interfaces: list[str] - """ - super().__init__(**kwargs) - self.mtu = mtu - self.interfaces = interfaces - - -class ManagedResourceGroupConfiguration(_serialization.Model): - """Managed Resource Group configuration properties. - - :ivar name: The NFC service will be hosted in a Managed resource group. - :vartype name: str - :ivar location: Managed resource group location. - :vartype location: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, location: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The NFC service will be hosted in a Managed resource group. - :paramtype name: str - :keyword location: Managed resource group location. - :paramtype location: str - """ - super().__init__(**kwargs) - self.name = name - self.location = location - - -class ManagementNetworkConfigurationPatchableProperties(_serialization.Model): # pylint: disable=name-too-long - """Configuration to be used to setup the management network. - - :ivar infrastructure_vpn_configuration: VPN Configuration properties. - :vartype infrastructure_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties - :ivar workload_vpn_configuration: VPN Configuration properties. - :vartype workload_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties - """ - - _attribute_map = { - "infrastructure_vpn_configuration": { - "key": "infrastructureVpnConfiguration", - "type": "VpnConfigurationPatchableProperties", - }, - "workload_vpn_configuration": { - "key": "workloadVpnConfiguration", - "type": "VpnConfigurationPatchableProperties", - }, - } - - def __init__( - self, - *, - infrastructure_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = None, - workload_vpn_configuration: Optional["_models.VpnConfigurationPatchableProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword infrastructure_vpn_configuration: VPN Configuration properties. - :paramtype infrastructure_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties - :keyword workload_vpn_configuration: VPN Configuration properties. - :paramtype workload_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchableProperties - """ - super().__init__(**kwargs) - self.infrastructure_vpn_configuration = infrastructure_vpn_configuration - self.workload_vpn_configuration = workload_vpn_configuration - - -class ManagementNetworkConfigurationProperties(_serialization.Model): - """Configuration to be used to setup the management network. - - All required parameters must be populated in order to send to server. - - :ivar infrastructure_vpn_configuration: VPN Configuration properties. Required. - :vartype infrastructure_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties - :ivar workload_vpn_configuration: VPN Configuration properties. Required. - :vartype workload_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties - """ - - _validation = { - "infrastructure_vpn_configuration": {"required": True}, - "workload_vpn_configuration": {"required": True}, - } - - _attribute_map = { - "infrastructure_vpn_configuration": { - "key": "infrastructureVpnConfiguration", - "type": "VpnConfigurationProperties", - }, - "workload_vpn_configuration": {"key": "workloadVpnConfiguration", "type": "VpnConfigurationProperties"}, - } - - def __init__( - self, - *, - infrastructure_vpn_configuration: "_models.VpnConfigurationProperties", - workload_vpn_configuration: "_models.VpnConfigurationProperties", - **kwargs: Any - ) -> None: - """ - :keyword infrastructure_vpn_configuration: VPN Configuration properties. Required. - :paramtype infrastructure_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties - :keyword workload_vpn_configuration: VPN Configuration properties. Required. - :paramtype workload_vpn_configuration: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationProperties - """ - super().__init__(**kwargs) - self.infrastructure_vpn_configuration = infrastructure_vpn_configuration - self.workload_vpn_configuration = workload_vpn_configuration - - -class NeighborAddress(_serialization.Model): - """Neighbor Address properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar address: IP Address. - :vartype address: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - """ - - _validation = { - "address": {"min_length": 1}, - "configuration_state": {"readonly": True}, - } - - _attribute_map = { - "address": {"key": "address", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - } - - def __init__(self, *, address: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword address: IP Address. - :paramtype address: str - """ - super().__init__(**kwargs) - self.address = address - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - - -class NeighborGroup(TrackedResource): - """Defines the Neighbor Group. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - :ivar network_tap_ids: List of NetworkTap IDs where neighbor group is associated. - :vartype network_tap_ids: list[str] - :ivar network_tap_rule_ids: List of Network Tap Rule IDs where neighbor group is associated. - :vartype network_tap_rule_ids: list[str] - :ivar provisioning_state: The provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_tap_ids": {"readonly": True}, - "network_tap_rule_ids": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "destination": {"key": "properties.destination", "type": "NeighborGroupDestination"}, - "network_tap_ids": {"key": "properties.networkTapIds", "type": "[str]"}, - "network_tap_rule_ids": {"key": "properties.networkTapRuleIds", "type": "[str]"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - destination: Optional["_models.NeighborGroupDestination"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :paramtype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.destination = destination - self.network_tap_ids: Optional[list[str]] = None - self.network_tap_rule_ids: Optional[list[str]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NeighborGroupDestination(_serialization.Model): - """An array of destination IPv4 Addresses or IPv6 Addresses. - - :ivar ipv4_addresses: Array of IPv4 Addresses. - :vartype ipv4_addresses: list[str] - :ivar ipv6_addresses: Array of IPv6 Addresses. - :vartype ipv6_addresses: list[str] - """ - - _validation = { - "ipv4_addresses": {"max_items": 16, "min_items": 0}, - "ipv6_addresses": {"max_items": 16, "min_items": 0}, - } - - _attribute_map = { - "ipv4_addresses": {"key": "ipv4Addresses", "type": "[str]"}, - "ipv6_addresses": {"key": "ipv6Addresses", "type": "[str]"}, - } - - def __init__( - self, *, ipv4_addresses: Optional[list[str]] = None, ipv6_addresses: Optional[list[str]] = None, **kwargs: Any - ) -> None: - """ - :keyword ipv4_addresses: Array of IPv4 Addresses. - :paramtype ipv4_addresses: list[str] - :keyword ipv6_addresses: Array of IPv6 Addresses. - :paramtype ipv6_addresses: list[str] - """ - super().__init__(**kwargs) - self.ipv4_addresses = ipv4_addresses - self.ipv6_addresses = ipv6_addresses - - -class NeighborGroupPatch(TagsUpdate): - """The Neighbor Group Patch definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "destination": {"key": "properties.destination", "type": "NeighborGroupDestination"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - destination: Optional["_models.NeighborGroupDestination"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :paramtype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.destination = destination - - -class NeighborGroupPatchableProperties(_serialization.Model): - """Neighbor Group Patchable Properties defines the patchable properties of the resource. - - :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - """ - - _attribute_map = { - "destination": {"key": "destination", "type": "NeighborGroupDestination"}, - } - - def __init__(self, *, destination: Optional["_models.NeighborGroupDestination"] = None, **kwargs: Any) -> None: - """ - :keyword destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :paramtype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - """ - super().__init__(**kwargs) - self.destination = destination - - -class NeighborGroupPatchProperties(AnnotationResource, NeighborGroupPatchableProperties): - """Neighbor Group Patch properties. - - :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "destination": {"key": "destination", "type": "NeighborGroupDestination"}, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - destination: Optional["_models.NeighborGroupDestination"] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :paramtype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, destination=destination, **kwargs) - self.destination = destination - self.annotation = annotation - - -class NeighborGroupProperties(AnnotationResource, NeighborGroupPatchableProperties): - """Neighbor Group Properties defines the properties of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :vartype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_tap_ids: List of NetworkTap IDs where neighbor group is associated. - :vartype network_tap_ids: list[str] - :ivar network_tap_rule_ids: List of Network Tap Rule IDs where neighbor group is associated. - :vartype network_tap_rule_ids: list[str] - :ivar provisioning_state: The provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "network_tap_ids": {"readonly": True}, - "network_tap_rule_ids": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "destination": {"key": "destination", "type": "NeighborGroupDestination"}, - "annotation": {"key": "annotation", "type": "str"}, - "network_tap_ids": {"key": "networkTapIds", "type": "[str]"}, - "network_tap_rule_ids": {"key": "networkTapRuleIds", "type": "[str]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - destination: Optional["_models.NeighborGroupDestination"] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword destination: An array of destination IPv4 Addresses or IPv6 Addresses. - :paramtype destination: ~azure.mgmt.managednetworkfabric.models.NeighborGroupDestination - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, destination=destination, **kwargs) - self.destination = destination - self.network_tap_ids: Optional[list[str]] = None - self.network_tap_rule_ids: Optional[list[str]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.annotation = annotation - - -class NeighborGroupsListResult(_serialization.Model): - """List of Neighbor Group. - - :ivar value: List of Neighbor Group resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NeighborGroup]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NeighborGroup"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of Neighbor Group resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkDevice(TrackedResource): - """The Network Device resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar host_name: The host name of the device. - :vartype host_name: str - :ivar serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :vartype serial_number: str - :ivar version: Current version of the device as defined in SKU. - :vartype version: str - :ivar network_device_sku: Network Device SKU name. - :vartype network_device_sku: str - :ivar network_device_role: NetworkDeviceRole is the device role: Example: CE | ToR. Known - values are: "CE", "ToR", "NPB", "TS", and "Management". - :vartype network_device_role: str or ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRole - :ivar network_rack_id: Reference to network rack resource id. - :vartype network_rack_id: str - :ivar management_ipv4_address: Management IPv4 Address. - :vartype management_ipv4_address: str - :ivar management_ipv6_address: Management IPv6 Address. - :vartype management_ipv6_address: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "host_name": {"min_length": 1}, - "serial_number": {"min_length": 1}, - "version": {"readonly": True}, - "network_device_role": {"readonly": True}, - "network_rack_id": {"readonly": True}, - "management_ipv4_address": {"readonly": True}, - "management_ipv6_address": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "serial_number": {"key": "properties.serialNumber", "type": "str"}, - "version": {"key": "properties.version", "type": "str"}, - "network_device_sku": {"key": "properties.networkDeviceSku", "type": "str"}, - "network_device_role": {"key": "properties.networkDeviceRole", "type": "str"}, - "network_rack_id": {"key": "properties.networkRackId", "type": "str"}, - "management_ipv4_address": {"key": "properties.managementIpv4Address", "type": "str"}, - "management_ipv6_address": {"key": "properties.managementIpv6Address", "type": "str"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - host_name: Optional[str] = None, - serial_number: Optional[str] = None, - network_device_sku: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword host_name: The host name of the device. - :paramtype host_name: str - :keyword serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :paramtype serial_number: str - :keyword network_device_sku: Network Device SKU name. - :paramtype network_device_sku: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.host_name = host_name - self.serial_number = serial_number - self.version: Optional[str] = None - self.network_device_sku = network_device_sku - self.network_device_role: Optional[Union[str, "_models.NetworkDeviceRole"]] = None - self.network_rack_id: Optional[str] = None - self.management_ipv4_address: Optional[str] = None - self.management_ipv6_address: Optional[str] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkDevicePatchableProperties(_serialization.Model): - """Network Device updatable properties. - - :ivar host_name: The host name of the device. - :vartype host_name: str - :ivar serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :vartype serial_number: str - """ - - _validation = { - "host_name": {"min_length": 1}, - "serial_number": {"min_length": 1}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - } - - def __init__(self, *, host_name: Optional[str] = None, serial_number: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword host_name: The host name of the device. - :paramtype host_name: str - :keyword serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :paramtype serial_number: str - """ - super().__init__(**kwargs) - self.host_name = host_name - self.serial_number = serial_number - - -class NetworkDevicePatchParameters(TagsUpdate): - """The Network Device Patch Parameters defines the patch parameters of the resource. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar host_name: The host name of the device. - :vartype host_name: str - :ivar serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :vartype serial_number: str - """ - - _validation = { - "host_name": {"min_length": 1}, - "serial_number": {"min_length": 1}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "host_name": {"key": "properties.hostName", "type": "str"}, - "serial_number": {"key": "properties.serialNumber", "type": "str"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - host_name: Optional[str] = None, - serial_number: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword host_name: The host name of the device. - :paramtype host_name: str - :keyword serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :paramtype serial_number: str - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.host_name = host_name - self.serial_number = serial_number - - -class NetworkDevicePatchParametersProperties(AnnotationResource, NetworkDevicePatchableProperties): - """Network Device Patch properties. - - :ivar host_name: The host name of the device. - :vartype host_name: str - :ivar serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :vartype serial_number: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _validation = { - "host_name": {"min_length": 1}, - "serial_number": {"min_length": 1}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - serial_number: Optional[str] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The host name of the device. - :paramtype host_name: str - :keyword serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :paramtype serial_number: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, host_name=host_name, serial_number=serial_number, **kwargs) - self.host_name = host_name - self.serial_number = serial_number - self.annotation = annotation - - -class NetworkDeviceProperties(AnnotationResource, NetworkDevicePatchableProperties): - """Network Device Properties defines the properties of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar host_name: The host name of the device. - :vartype host_name: str - :ivar serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :vartype serial_number: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar version: Current version of the device as defined in SKU. - :vartype version: str - :ivar network_device_sku: Network Device SKU name. - :vartype network_device_sku: str - :ivar network_device_role: NetworkDeviceRole is the device role: Example: CE | ToR. Known - values are: "CE", "ToR", "NPB", "TS", and "Management". - :vartype network_device_role: str or ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRole - :ivar network_rack_id: Reference to network rack resource id. - :vartype network_rack_id: str - :ivar management_ipv4_address: Management IPv4 Address. - :vartype management_ipv4_address: str - :ivar management_ipv6_address: Management IPv6 Address. - :vartype management_ipv6_address: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "host_name": {"min_length": 1}, - "serial_number": {"min_length": 1}, - "version": {"readonly": True}, - "network_device_role": {"readonly": True}, - "network_rack_id": {"readonly": True}, - "management_ipv4_address": {"readonly": True}, - "management_ipv6_address": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "host_name": {"key": "hostName", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - "annotation": {"key": "annotation", "type": "str"}, - "version": {"key": "version", "type": "str"}, - "network_device_sku": {"key": "networkDeviceSku", "type": "str"}, - "network_device_role": {"key": "networkDeviceRole", "type": "str"}, - "network_rack_id": {"key": "networkRackId", "type": "str"}, - "management_ipv4_address": {"key": "managementIpv4Address", "type": "str"}, - "management_ipv6_address": {"key": "managementIpv6Address", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - host_name: Optional[str] = None, - serial_number: Optional[str] = None, - annotation: Optional[str] = None, - network_device_sku: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_name: The host name of the device. - :paramtype host_name: str - :keyword serial_number: Serial number of the device. Format of serial Number - - Make;Model;HardwareRevisionId;SerialNumber. - :paramtype serial_number: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_device_sku: Network Device SKU name. - :paramtype network_device_sku: str - """ - super().__init__(annotation=annotation, host_name=host_name, serial_number=serial_number, **kwargs) - self.host_name = host_name - self.serial_number = serial_number - self.version: Optional[str] = None - self.network_device_sku = network_device_sku - self.network_device_role: Optional[Union[str, "_models.NetworkDeviceRole"]] = None - self.network_rack_id: Optional[str] = None - self.management_ipv4_address: Optional[str] = None - self.management_ipv6_address: Optional[str] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class NetworkDeviceSku(ProxyResource): - """The NetworkDeviceSku resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar model: Model of the network device. Required. - :vartype model: str - :ivar manufacturer: Manufacturer of the network device. - :vartype manufacturer: str - :ivar supported_versions: List of supported version details of network device. - :vartype supported_versions: - list[~azure.mgmt.managednetworkfabric.models.SupportedVersionProperties] - :ivar supported_role_types: Available roles for the network device. - :vartype supported_role_types: list[str or - ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName] - :ivar interfaces: List of network device interfaces. - :vartype interfaces: list[~azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties] - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "model": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "model": {"key": "properties.model", "type": "str"}, - "manufacturer": {"key": "properties.manufacturer", "type": "str"}, - "supported_versions": {"key": "properties.supportedVersions", "type": "[SupportedVersionProperties]"}, - "supported_role_types": {"key": "properties.supportedRoleTypes", "type": "[str]"}, - "interfaces": {"key": "properties.interfaces", "type": "[DeviceInterfaceProperties]"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - model: str, - manufacturer: Optional[str] = None, - supported_versions: Optional[list["_models.SupportedVersionProperties"]] = None, - supported_role_types: Optional[list[Union[str, "_models.NetworkDeviceRoleName"]]] = None, - interfaces: Optional[list["_models.DeviceInterfaceProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword model: Model of the network device. Required. - :paramtype model: str - :keyword manufacturer: Manufacturer of the network device. - :paramtype manufacturer: str - :keyword supported_versions: List of supported version details of network device. - :paramtype supported_versions: - list[~azure.mgmt.managednetworkfabric.models.SupportedVersionProperties] - :keyword supported_role_types: Available roles for the network device. - :paramtype supported_role_types: list[str or - ~azure.mgmt.managednetworkfabric.models.NetworkDeviceRoleName] - :keyword interfaces: List of network device interfaces. - :paramtype interfaces: list[~azure.mgmt.managednetworkfabric.models.DeviceInterfaceProperties] - """ - super().__init__(**kwargs) - self.model = model - self.manufacturer = manufacturer - self.supported_versions = supported_versions - self.supported_role_types = supported_role_types - self.interfaces = interfaces - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkDeviceSkusListResult(_serialization.Model): - """List of Network Device SKUs. - - :ivar value: List of Network Device SKU resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkDeviceSku]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkDeviceSku"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of Network Device SKU resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkDevicesListResult(_serialization.Model): - """List of NetworkDevices. - - :ivar value: List of NetworkDevice resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkDevice]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NetworkDevice"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkDevice resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkFabric(TrackedResource): - """The Network Fabric resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_sku: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once - the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The - SKU determines whether it is a single / multi rack Network Fabric. Required. - :vartype network_fabric_sku: str - :ivar fabric_version: The version of Network Fabric. - :vartype fabric_version: str - :ivar router_ids: Array of router IDs. - :vartype router_ids: list[str] - :ivar network_fabric_controller_id: Azure resource ID for the NetworkFabricController the - NetworkFabric belongs. Required. - :vartype network_fabric_controller_id: str - :ivar rack_count: Number of compute racks associated to Network Fabric. - :vartype rack_count: int - :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. Required. - :vartype server_count_per_rack: int - :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required. - :vartype ipv4_prefix: str - :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :vartype ipv6_prefix: str - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. Required. - :vartype fabric_asn: int - :ivar terminal_server_configuration: Network and credentials configuration currently applied to - terminal server. Required. - :vartype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration - :ivar management_network_configuration: Configuration to be used to setup the management - network. Required. - :vartype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties - :ivar racks: List of NetworkRack resource IDs under the Network Fabric. The number of racks - allowed depends on the Network Fabric SKU. - :vartype racks: list[str] - :ivar l2_isolation_domains: List of L2 Isolation Domain resource IDs under the Network Fabric. - :vartype l2_isolation_domains: list[str] - :ivar l3_isolation_domains: List of L3 Isolation Domain resource IDs under the Network Fabric. - :vartype l3_isolation_domains: list[str] - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_sku": {"required": True, "min_length": 1}, - "fabric_version": {"min_length": 1}, - "router_ids": {"readonly": True}, - "network_fabric_controller_id": {"required": True}, - "rack_count": {"maximum": 8, "minimum": 1}, - "server_count_per_rack": {"required": True, "maximum": 16, "minimum": 1}, - "ipv4_prefix": {"required": True, "min_length": 1}, - "ipv6_prefix": {"min_length": 1}, - "fabric_asn": {"required": True, "maximum": 4294967295, "minimum": 1}, - "terminal_server_configuration": {"required": True}, - "management_network_configuration": {"required": True}, - "racks": {"readonly": True}, - "l2_isolation_domains": {"readonly": True}, - "l3_isolation_domains": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_fabric_sku": {"key": "properties.networkFabricSku", "type": "str"}, - "fabric_version": {"key": "properties.fabricVersion", "type": "str"}, - "router_ids": {"key": "properties.routerIds", "type": "[str]"}, - "network_fabric_controller_id": {"key": "properties.networkFabricControllerId", "type": "str"}, - "rack_count": {"key": "properties.rackCount", "type": "int"}, - "server_count_per_rack": {"key": "properties.serverCountPerRack", "type": "int"}, - "ipv4_prefix": {"key": "properties.ipv4Prefix", "type": "str"}, - "ipv6_prefix": {"key": "properties.ipv6Prefix", "type": "str"}, - "fabric_asn": {"key": "properties.fabricASN", "type": "int"}, - "terminal_server_configuration": { - "key": "properties.terminalServerConfiguration", - "type": "TerminalServerConfiguration", - }, - "management_network_configuration": { - "key": "properties.managementNetworkConfiguration", - "type": "ManagementNetworkConfigurationProperties", - }, - "racks": {"key": "properties.racks", "type": "[str]"}, - "l2_isolation_domains": {"key": "properties.l2IsolationDomains", "type": "[str]"}, - "l3_isolation_domains": {"key": "properties.l3IsolationDomains", "type": "[str]"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_fabric_sku: str, - network_fabric_controller_id: str, - server_count_per_rack: int, - ipv4_prefix: str, - fabric_asn: int, - terminal_server_configuration: "_models.TerminalServerConfiguration", - management_network_configuration: "_models.ManagementNetworkConfigurationProperties", - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - fabric_version: Optional[str] = None, - rack_count: Optional[int] = None, - ipv6_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_sku: Supported Network Fabric SKU.Example: Compute / Aggregate racks. - Once the user chooses a particular SKU, only supported racks can be added to the Network - Fabric. The SKU determines whether it is a single / multi rack Network Fabric. Required. - :paramtype network_fabric_sku: str - :keyword fabric_version: The version of Network Fabric. - :paramtype fabric_version: str - :keyword network_fabric_controller_id: Azure resource ID for the NetworkFabricController the - NetworkFabric belongs. Required. - :paramtype network_fabric_controller_id: str - :keyword rack_count: Number of compute racks associated to Network Fabric. - :paramtype rack_count: int - :keyword server_count_per_rack: Number of servers.Possible values are from 1-16. Required. - :paramtype server_count_per_rack: int - :keyword ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required. - :paramtype ipv4_prefix: str - :keyword ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :paramtype ipv6_prefix: str - :keyword fabric_asn: ASN of CE devices for CE/PE connectivity. Required. - :paramtype fabric_asn: int - :keyword terminal_server_configuration: Network and credentials configuration currently applied - to terminal server. Required. - :paramtype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration - :keyword management_network_configuration: Configuration to be used to setup the management - network. Required. - :paramtype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.network_fabric_sku = network_fabric_sku - self.fabric_version = fabric_version - self.router_ids: Optional[list[str]] = None - self.network_fabric_controller_id = network_fabric_controller_id - self.rack_count = rack_count - self.server_count_per_rack = server_count_per_rack - self.ipv4_prefix = ipv4_prefix - self.ipv6_prefix = ipv6_prefix - self.fabric_asn = fabric_asn - self.terminal_server_configuration = terminal_server_configuration - self.management_network_configuration = management_network_configuration - self.racks: Optional[list[str]] = None - self.l2_isolation_domains: Optional[list[str]] = None - self.l3_isolation_domains: Optional[list[str]] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkFabricController(TrackedResource): - """The Network Fabric Controller resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :vartype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :vartype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar infrastructure_services: InfrastructureServices IP ranges. - :vartype infrastructure_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices - :ivar workload_services: WorkloadServices IP ranges. - :vartype workload_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices - :ivar managed_resource_group_configuration: Managed Resource Group configuration properties. - :vartype managed_resource_group_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration - :ivar network_fabric_ids: The NF-ID will be an input parameter used by the NF to link and get - associated with the parent NFC Service. - :vartype network_fabric_ids: list[str] - :ivar workload_management_network: A workload management network is required for all the tenant - (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to - access internet or any other MSFT/Public endpoints. This is used for the backward - compatibility. - :vartype workload_management_network: bool - :ivar is_workload_management_network_enabled: A workload management network is required for all - the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are - required to access internet or any other MSFT/Public endpoints. Known values are: "True" and - "False". - :vartype is_workload_management_network_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled - :ivar tenant_internet_gateway_ids: List of tenant InternetGateway resource IDs. - :vartype tenant_internet_gateway_ids: list[str] - :ivar ipv4_address_space: IPv4 Network Fabric Controller Address Space. - :vartype ipv4_address_space: str - :ivar ipv6_address_space: IPv6 Network Fabric Controller Address Space. - :vartype ipv6_address_space: str - :ivar nfc_sku: Network Fabric Controller SKU. Known values are: "Basic", "Standard", and - "HighPerformance". - :vartype nfc_sku: str or ~azure.mgmt.managednetworkfabric.models.NfcSku - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "infrastructure_services": {"readonly": True}, - "workload_services": {"readonly": True}, - "network_fabric_ids": {"readonly": True}, - "workload_management_network": {"readonly": True}, - "tenant_internet_gateway_ids": {"readonly": True}, - "ipv4_address_space": {"min_length": 1}, - "ipv6_address_space": {"min_length": 1}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "infrastructure_express_route_connections": { - "key": "properties.infrastructureExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "workload_express_route_connections": { - "key": "properties.workloadExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "infrastructure_services": {"key": "properties.infrastructureServices", "type": "ControllerServices"}, - "workload_services": {"key": "properties.workloadServices", "type": "ControllerServices"}, - "managed_resource_group_configuration": { - "key": "properties.managedResourceGroupConfiguration", - "type": "ManagedResourceGroupConfiguration", - }, - "network_fabric_ids": {"key": "properties.networkFabricIds", "type": "[str]"}, - "workload_management_network": {"key": "properties.workloadManagementNetwork", "type": "bool"}, - "is_workload_management_network_enabled": { - "key": "properties.isWorkloadManagementNetworkEnabled", - "type": "str", - }, - "tenant_internet_gateway_ids": {"key": "properties.tenantInternetGatewayIds", "type": "[str]"}, - "ipv4_address_space": {"key": "properties.ipv4AddressSpace", "type": "str"}, - "ipv6_address_space": {"key": "properties.ipv6AddressSpace", "type": "str"}, - "nfc_sku": {"key": "properties.nfcSku", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = None, - is_workload_management_network_enabled: Union[str, "_models.IsWorkloadManagementNetworkEnabled"] = "True", - ipv4_address_space: str = "10.0.0.0/19", - ipv6_address_space: str = "FC00::/59", - nfc_sku: Union[str, "_models.NfcSku"] = "Standard", - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :paramtype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :paramtype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword managed_resource_group_configuration: Managed Resource Group configuration properties. - :paramtype managed_resource_group_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration - :keyword is_workload_management_network_enabled: A workload management network is required for - all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which - are required to access internet or any other MSFT/Public endpoints. Known values are: "True" - and "False". - :paramtype is_workload_management_network_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled - :keyword ipv4_address_space: IPv4 Network Fabric Controller Address Space. - :paramtype ipv4_address_space: str - :keyword ipv6_address_space: IPv6 Network Fabric Controller Address Space. - :paramtype ipv6_address_space: str - :keyword nfc_sku: Network Fabric Controller SKU. Known values are: "Basic", "Standard", and - "HighPerformance". - :paramtype nfc_sku: str or ~azure.mgmt.managednetworkfabric.models.NfcSku - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.infrastructure_express_route_connections = infrastructure_express_route_connections - self.workload_express_route_connections = workload_express_route_connections - self.infrastructure_services: Optional["_models.ControllerServices"] = None - self.workload_services: Optional["_models.ControllerServices"] = None - self.managed_resource_group_configuration = managed_resource_group_configuration - self.network_fabric_ids: Optional[list[str]] = None - self.workload_management_network: Optional[bool] = None - self.is_workload_management_network_enabled = is_workload_management_network_enabled - self.tenant_internet_gateway_ids: Optional[list[str]] = None - self.ipv4_address_space = ipv4_address_space - self.ipv6_address_space = ipv6_address_space - self.nfc_sku = nfc_sku - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkFabricControllerPatch(TagsUpdate): - """The Network Fabric Controller Patch payload definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :vartype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :vartype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "infrastructure_express_route_connections": { - "key": "properties.infrastructureExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "workload_express_route_connections": { - "key": "properties.workloadExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :paramtype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :paramtype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - """ - super().__init__(tags=tags, **kwargs) - self.infrastructure_express_route_connections = infrastructure_express_route_connections - self.workload_express_route_connections = workload_express_route_connections - - -class NetworkFabricControllerPatchableProperties(_serialization.Model): # pylint: disable=name-too-long - """Network Fabric Controller updatable properties. - - :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :vartype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :vartype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - """ - - _attribute_map = { - "infrastructure_express_route_connections": { - "key": "infrastructureExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "workload_express_route_connections": { - "key": "workloadExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - } - - def __init__( - self, - *, - infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :paramtype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :paramtype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - """ - super().__init__(**kwargs) - self.infrastructure_express_route_connections = infrastructure_express_route_connections - self.workload_express_route_connections = workload_express_route_connections - - -class NetworkFabricControllerProperties(AnnotationResource, NetworkFabricControllerPatchableProperties): - """NetworkFabricControllerProperties defines the resource properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :vartype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :vartype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar infrastructure_services: InfrastructureServices IP ranges. - :vartype infrastructure_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices - :ivar workload_services: WorkloadServices IP ranges. - :vartype workload_services: ~azure.mgmt.managednetworkfabric.models.ControllerServices - :ivar managed_resource_group_configuration: Managed Resource Group configuration properties. - :vartype managed_resource_group_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration - :ivar network_fabric_ids: The NF-ID will be an input parameter used by the NF to link and get - associated with the parent NFC Service. - :vartype network_fabric_ids: list[str] - :ivar workload_management_network: A workload management network is required for all the tenant - (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to - access internet or any other MSFT/Public endpoints. This is used for the backward - compatibility. - :vartype workload_management_network: bool - :ivar is_workload_management_network_enabled: A workload management network is required for all - the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are - required to access internet or any other MSFT/Public endpoints. Known values are: "True" and - "False". - :vartype is_workload_management_network_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled - :ivar tenant_internet_gateway_ids: List of tenant InternetGateway resource IDs. - :vartype tenant_internet_gateway_ids: list[str] - :ivar ipv4_address_space: IPv4 Network Fabric Controller Address Space. - :vartype ipv4_address_space: str - :ivar ipv6_address_space: IPv6 Network Fabric Controller Address Space. - :vartype ipv6_address_space: str - :ivar nfc_sku: Network Fabric Controller SKU. Known values are: "Basic", "Standard", and - "HighPerformance". - :vartype nfc_sku: str or ~azure.mgmt.managednetworkfabric.models.NfcSku - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "infrastructure_services": {"readonly": True}, - "workload_services": {"readonly": True}, - "network_fabric_ids": {"readonly": True}, - "workload_management_network": {"readonly": True}, - "tenant_internet_gateway_ids": {"readonly": True}, - "ipv4_address_space": {"min_length": 1}, - "ipv6_address_space": {"min_length": 1}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "infrastructure_express_route_connections": { - "key": "infrastructureExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "workload_express_route_connections": { - "key": "workloadExpressRouteConnections", - "type": "[ExpressRouteConnectionInformation]", - }, - "annotation": {"key": "annotation", "type": "str"}, - "infrastructure_services": {"key": "infrastructureServices", "type": "ControllerServices"}, - "workload_services": {"key": "workloadServices", "type": "ControllerServices"}, - "managed_resource_group_configuration": { - "key": "managedResourceGroupConfiguration", - "type": "ManagedResourceGroupConfiguration", - }, - "network_fabric_ids": {"key": "networkFabricIds", "type": "[str]"}, - "workload_management_network": {"key": "workloadManagementNetwork", "type": "bool"}, - "is_workload_management_network_enabled": {"key": "isWorkloadManagementNetworkEnabled", "type": "str"}, - "tenant_internet_gateway_ids": {"key": "tenantInternetGatewayIds", "type": "[str]"}, - "ipv4_address_space": {"key": "ipv4AddressSpace", "type": "str"}, - "ipv6_address_space": {"key": "ipv6AddressSpace", "type": "str"}, - "nfc_sku": {"key": "nfcSku", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - infrastructure_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - workload_express_route_connections: Optional[list["_models.ExpressRouteConnectionInformation"]] = None, - annotation: Optional[str] = None, - managed_resource_group_configuration: Optional["_models.ManagedResourceGroupConfiguration"] = None, - is_workload_management_network_enabled: Union[str, "_models.IsWorkloadManagementNetworkEnabled"] = "True", - ipv4_address_space: str = "10.0.0.0/19", - ipv6_address_space: str = "FC00::/59", - nfc_sku: Union[str, "_models.NfcSku"] = "Standard", - **kwargs: Any - ) -> None: - """ - :keyword infrastructure_express_route_connections: As part of an update, the Infrastructure - ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is - dedicated for Infrastructure services. (This is a Mandatory attribute). - :paramtype infrastructure_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword workload_express_route_connections: As part of an update, the workload ExpressRoute - CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for - Workload services. (This is a Mandatory attribute). - :paramtype workload_express_route_connections: - list[~azure.mgmt.managednetworkfabric.models.ExpressRouteConnectionInformation] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword managed_resource_group_configuration: Managed Resource Group configuration properties. - :paramtype managed_resource_group_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagedResourceGroupConfiguration - :keyword is_workload_management_network_enabled: A workload management network is required for - all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which - are required to access internet or any other MSFT/Public endpoints. Known values are: "True" - and "False". - :paramtype is_workload_management_network_enabled: str or - ~azure.mgmt.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled - :keyword ipv4_address_space: IPv4 Network Fabric Controller Address Space. - :paramtype ipv4_address_space: str - :keyword ipv6_address_space: IPv6 Network Fabric Controller Address Space. - :paramtype ipv6_address_space: str - :keyword nfc_sku: Network Fabric Controller SKU. Known values are: "Basic", "Standard", and - "HighPerformance". - :paramtype nfc_sku: str or ~azure.mgmt.managednetworkfabric.models.NfcSku - """ - super().__init__( - annotation=annotation, - infrastructure_express_route_connections=infrastructure_express_route_connections, - workload_express_route_connections=workload_express_route_connections, - **kwargs - ) - self.infrastructure_express_route_connections = infrastructure_express_route_connections - self.workload_express_route_connections = workload_express_route_connections - self.infrastructure_services: Optional["_models.ControllerServices"] = None - self.workload_services: Optional["_models.ControllerServices"] = None - self.managed_resource_group_configuration = managed_resource_group_configuration - self.network_fabric_ids: Optional[list[str]] = None - self.workload_management_network: Optional[bool] = None - self.is_workload_management_network_enabled = is_workload_management_network_enabled - self.tenant_internet_gateway_ids: Optional[list[str]] = None - self.ipv4_address_space = ipv4_address_space - self.ipv6_address_space = ipv6_address_space - self.nfc_sku = nfc_sku - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.annotation = annotation - - -class NetworkFabricControllersListResult(_serialization.Model): - """List of Network Fabric Controllers. - - :ivar value: List of Network Fabric Controller resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkFabricController]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkFabricController"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of Network Fabric Controller resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkFabricPatch(TagsUpdate): - """The Network Fabric resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar rack_count: Number of compute racks associated to Network Fabric. - :vartype rack_count: int - :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. - :vartype server_count_per_rack: int - :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :vartype ipv4_prefix: str - :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :vartype ipv6_prefix: str - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. - :vartype fabric_asn: int - :ivar terminal_server_configuration: Network and credentials configuration already applied to - terminal server. - :vartype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :ivar management_network_configuration: Configuration to be used to setup the management - network. - :vartype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - """ - - _validation = { - "rack_count": {"maximum": 8, "minimum": 1}, - "server_count_per_rack": {"maximum": 16, "minimum": 1}, - "ipv4_prefix": {"min_length": 1}, - "ipv6_prefix": {"min_length": 1}, - "fabric_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "rack_count": {"key": "properties.rackCount", "type": "int"}, - "server_count_per_rack": {"key": "properties.serverCountPerRack", "type": "int"}, - "ipv4_prefix": {"key": "properties.ipv4Prefix", "type": "str"}, - "ipv6_prefix": {"key": "properties.ipv6Prefix", "type": "str"}, - "fabric_asn": {"key": "properties.fabricASN", "type": "int"}, - "terminal_server_configuration": { - "key": "properties.terminalServerConfiguration", - "type": "NetworkFabricPatchablePropertiesTerminalServerConfiguration", - }, - "management_network_configuration": { - "key": "properties.managementNetworkConfiguration", - "type": "ManagementNetworkConfigurationPatchableProperties", - }, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - rack_count: Optional[int] = None, - server_count_per_rack: Optional[int] = None, - ipv4_prefix: Optional[str] = None, - ipv6_prefix: Optional[str] = None, - fabric_asn: Optional[int] = None, - terminal_server_configuration: Optional[ - "_models.NetworkFabricPatchablePropertiesTerminalServerConfiguration" - ] = None, - management_network_configuration: Optional["_models.ManagementNetworkConfigurationPatchableProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword rack_count: Number of compute racks associated to Network Fabric. - :paramtype rack_count: int - :keyword server_count_per_rack: Number of servers.Possible values are from 1-16. - :paramtype server_count_per_rack: int - :keyword ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :paramtype ipv4_prefix: str - :keyword ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :paramtype ipv6_prefix: str - :keyword fabric_asn: ASN of CE devices for CE/PE connectivity. - :paramtype fabric_asn: int - :keyword terminal_server_configuration: Network and credentials configuration already applied - to terminal server. - :paramtype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :keyword management_network_configuration: Configuration to be used to setup the management - network. - :paramtype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.rack_count = rack_count - self.server_count_per_rack = server_count_per_rack - self.ipv4_prefix = ipv4_prefix - self.ipv6_prefix = ipv6_prefix - self.fabric_asn = fabric_asn - self.terminal_server_configuration = terminal_server_configuration - self.management_network_configuration = management_network_configuration - - -class NetworkFabricPatchableProperties(_serialization.Model): - """Network Fabric updatable properties. - - :ivar rack_count: Number of compute racks associated to Network Fabric. - :vartype rack_count: int - :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. - :vartype server_count_per_rack: int - :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :vartype ipv4_prefix: str - :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :vartype ipv6_prefix: str - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. - :vartype fabric_asn: int - :ivar terminal_server_configuration: Network and credentials configuration already applied to - terminal server. - :vartype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :ivar management_network_configuration: Configuration to be used to setup the management - network. - :vartype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - """ - - _validation = { - "rack_count": {"maximum": 8, "minimum": 1}, - "server_count_per_rack": {"maximum": 16, "minimum": 1}, - "ipv4_prefix": {"min_length": 1}, - "ipv6_prefix": {"min_length": 1}, - "fabric_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "rack_count": {"key": "rackCount", "type": "int"}, - "server_count_per_rack": {"key": "serverCountPerRack", "type": "int"}, - "ipv4_prefix": {"key": "ipv4Prefix", "type": "str"}, - "ipv6_prefix": {"key": "ipv6Prefix", "type": "str"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "terminal_server_configuration": { - "key": "terminalServerConfiguration", - "type": "NetworkFabricPatchablePropertiesTerminalServerConfiguration", - }, - "management_network_configuration": { - "key": "managementNetworkConfiguration", - "type": "ManagementNetworkConfigurationPatchableProperties", - }, - } - - def __init__( - self, - *, - rack_count: Optional[int] = None, - server_count_per_rack: Optional[int] = None, - ipv4_prefix: Optional[str] = None, - ipv6_prefix: Optional[str] = None, - fabric_asn: Optional[int] = None, - terminal_server_configuration: Optional[ - "_models.NetworkFabricPatchablePropertiesTerminalServerConfiguration" - ] = None, - management_network_configuration: Optional["_models.ManagementNetworkConfigurationPatchableProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword rack_count: Number of compute racks associated to Network Fabric. - :paramtype rack_count: int - :keyword server_count_per_rack: Number of servers.Possible values are from 1-16. - :paramtype server_count_per_rack: int - :keyword ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :paramtype ipv4_prefix: str - :keyword ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :paramtype ipv6_prefix: str - :keyword fabric_asn: ASN of CE devices for CE/PE connectivity. - :paramtype fabric_asn: int - :keyword terminal_server_configuration: Network and credentials configuration already applied - to terminal server. - :paramtype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :keyword management_network_configuration: Configuration to be used to setup the management - network. - :paramtype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - """ - super().__init__(**kwargs) - self.rack_count = rack_count - self.server_count_per_rack = server_count_per_rack - self.ipv4_prefix = ipv4_prefix - self.ipv6_prefix = ipv6_prefix - self.fabric_asn = fabric_asn - self.terminal_server_configuration = terminal_server_configuration - self.management_network_configuration = management_network_configuration - - -class TerminalServerPatchableProperties(_serialization.Model): - """Network and credential configuration currently applied on terminal server. - - :ivar username: Username for the terminal server connection. - :vartype username: str - :ivar password: Password for the terminal server connection. - :vartype password: str - :ivar serial_number: Serial Number of Terminal server. - :vartype serial_number: str - """ - - _validation = { - "username": {"min_length": 1}, - "password": {"min_length": 1}, - "serial_number": {"min_length": 1}, - } - - _attribute_map = { - "username": {"key": "username", "type": "str"}, - "password": {"key": "password", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - } - - def __init__( - self, - *, - username: Optional[str] = None, - password: Optional[str] = None, - serial_number: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword username: Username for the terminal server connection. - :paramtype username: str - :keyword password: Password for the terminal server connection. - :paramtype password: str - :keyword serial_number: Serial Number of Terminal server. - :paramtype serial_number: str - """ - super().__init__(**kwargs) - self.username = username - self.password = password - self.serial_number = serial_number - - -class NetworkFabricPatchablePropertiesTerminalServerConfiguration( - TerminalServerPatchableProperties, Layer3IpPrefixProperties -): # pylint: disable=name-too-long - """Network and credentials configuration already applied to terminal server. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar username: Username for the terminal server connection. - :vartype username: str - :ivar password: Password for the terminal server connection. - :vartype password: str - :ivar serial_number: Serial Number of Terminal server. - :vartype serial_number: str - """ - - _validation = { - "username": {"min_length": 1}, - "password": {"min_length": 1}, - "serial_number": {"min_length": 1}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "username": {"key": "username", "type": "str"}, - "password": {"key": "password", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - username: Optional[str] = None, - password: Optional[str] = None, - serial_number: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword username: Username for the terminal server connection. - :paramtype username: str - :keyword password: Password for the terminal server connection. - :paramtype password: str - :keyword serial_number: Serial Number of Terminal server. - :paramtype serial_number: str - """ - super().__init__( - username=username, - password=password, - serial_number=serial_number, - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - **kwargs - ) - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - self.username = username - self.password = password - self.serial_number = serial_number - - -class NetworkFabricPatchProperties(AnnotationResource, NetworkFabricPatchableProperties): - """Network Fabric Patch properties. - - :ivar rack_count: Number of compute racks associated to Network Fabric. - :vartype rack_count: int - :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. - :vartype server_count_per_rack: int - :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :vartype ipv4_prefix: str - :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :vartype ipv6_prefix: str - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. - :vartype fabric_asn: int - :ivar terminal_server_configuration: Network and credentials configuration already applied to - terminal server. - :vartype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :ivar management_network_configuration: Configuration to be used to setup the management - network. - :vartype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _validation = { - "rack_count": {"maximum": 8, "minimum": 1}, - "server_count_per_rack": {"maximum": 16, "minimum": 1}, - "ipv4_prefix": {"min_length": 1}, - "ipv6_prefix": {"min_length": 1}, - "fabric_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "rack_count": {"key": "rackCount", "type": "int"}, - "server_count_per_rack": {"key": "serverCountPerRack", "type": "int"}, - "ipv4_prefix": {"key": "ipv4Prefix", "type": "str"}, - "ipv6_prefix": {"key": "ipv6Prefix", "type": "str"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "terminal_server_configuration": { - "key": "terminalServerConfiguration", - "type": "NetworkFabricPatchablePropertiesTerminalServerConfiguration", - }, - "management_network_configuration": { - "key": "managementNetworkConfiguration", - "type": "ManagementNetworkConfigurationPatchableProperties", - }, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - rack_count: Optional[int] = None, - server_count_per_rack: Optional[int] = None, - ipv4_prefix: Optional[str] = None, - ipv6_prefix: Optional[str] = None, - fabric_asn: Optional[int] = None, - terminal_server_configuration: Optional[ - "_models.NetworkFabricPatchablePropertiesTerminalServerConfiguration" - ] = None, - management_network_configuration: Optional["_models.ManagementNetworkConfigurationPatchableProperties"] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword rack_count: Number of compute racks associated to Network Fabric. - :paramtype rack_count: int - :keyword server_count_per_rack: Number of servers.Possible values are from 1-16. - :paramtype server_count_per_rack: int - :keyword ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. - :paramtype ipv4_prefix: str - :keyword ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :paramtype ipv6_prefix: str - :keyword fabric_asn: ASN of CE devices for CE/PE connectivity. - :paramtype fabric_asn: int - :keyword terminal_server_configuration: Network and credentials configuration already applied - to terminal server. - :paramtype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration - :keyword management_network_configuration: Configuration to be used to setup the management - network. - :paramtype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__( - annotation=annotation, - rack_count=rack_count, - server_count_per_rack=server_count_per_rack, - ipv4_prefix=ipv4_prefix, - ipv6_prefix=ipv6_prefix, - fabric_asn=fabric_asn, - terminal_server_configuration=terminal_server_configuration, - management_network_configuration=management_network_configuration, - **kwargs - ) - self.rack_count = rack_count - self.server_count_per_rack = server_count_per_rack - self.ipv4_prefix = ipv4_prefix - self.ipv6_prefix = ipv6_prefix - self.fabric_asn = fabric_asn - self.terminal_server_configuration = terminal_server_configuration - self.management_network_configuration = management_network_configuration - self.annotation = annotation - - -class NetworkFabricProperties(AnnotationResource): - """Network Fabric Properties defines the properties of the 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 server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_sku: Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once - the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The - SKU determines whether it is a single / multi rack Network Fabric. Required. - :vartype network_fabric_sku: str - :ivar fabric_version: The version of Network Fabric. - :vartype fabric_version: str - :ivar router_ids: Array of router IDs. - :vartype router_ids: list[str] - :ivar network_fabric_controller_id: Azure resource ID for the NetworkFabricController the - NetworkFabric belongs. Required. - :vartype network_fabric_controller_id: str - :ivar rack_count: Number of compute racks associated to Network Fabric. - :vartype rack_count: int - :ivar server_count_per_rack: Number of servers.Possible values are from 1-16. Required. - :vartype server_count_per_rack: int - :ivar ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required. - :vartype ipv4_prefix: str - :ivar ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :vartype ipv6_prefix: str - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. Required. - :vartype fabric_asn: int - :ivar terminal_server_configuration: Network and credentials configuration currently applied to - terminal server. Required. - :vartype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration - :ivar management_network_configuration: Configuration to be used to setup the management - network. Required. - :vartype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties - :ivar racks: List of NetworkRack resource IDs under the Network Fabric. The number of racks - allowed depends on the Network Fabric SKU. - :vartype racks: list[str] - :ivar l2_isolation_domains: List of L2 Isolation Domain resource IDs under the Network Fabric. - :vartype l2_isolation_domains: list[str] - :ivar l3_isolation_domains: List of L3 Isolation Domain resource IDs under the Network Fabric. - :vartype l3_isolation_domains: list[str] - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of NFC provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "network_fabric_sku": {"required": True, "min_length": 1}, - "fabric_version": {"min_length": 1}, - "router_ids": {"readonly": True}, - "network_fabric_controller_id": {"required": True}, - "rack_count": {"maximum": 8, "minimum": 1}, - "server_count_per_rack": {"required": True, "maximum": 16, "minimum": 1}, - "ipv4_prefix": {"required": True, "min_length": 1}, - "ipv6_prefix": {"min_length": 1}, - "fabric_asn": {"required": True, "maximum": 4294967295, "minimum": 1}, - "terminal_server_configuration": {"required": True}, - "management_network_configuration": {"required": True}, - "racks": {"readonly": True}, - "l2_isolation_domains": {"readonly": True}, - "l3_isolation_domains": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "network_fabric_sku": {"key": "networkFabricSku", "type": "str"}, - "fabric_version": {"key": "fabricVersion", "type": "str"}, - "router_ids": {"key": "routerIds", "type": "[str]"}, - "network_fabric_controller_id": {"key": "networkFabricControllerId", "type": "str"}, - "rack_count": {"key": "rackCount", "type": "int"}, - "server_count_per_rack": {"key": "serverCountPerRack", "type": "int"}, - "ipv4_prefix": {"key": "ipv4Prefix", "type": "str"}, - "ipv6_prefix": {"key": "ipv6Prefix", "type": "str"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - "terminal_server_configuration": {"key": "terminalServerConfiguration", "type": "TerminalServerConfiguration"}, - "management_network_configuration": { - "key": "managementNetworkConfiguration", - "type": "ManagementNetworkConfigurationProperties", - }, - "racks": {"key": "racks", "type": "[str]"}, - "l2_isolation_domains": {"key": "l2IsolationDomains", "type": "[str]"}, - "l3_isolation_domains": {"key": "l3IsolationDomains", "type": "[str]"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - network_fabric_sku: str, - network_fabric_controller_id: str, - server_count_per_rack: int, - ipv4_prefix: str, - fabric_asn: int, - terminal_server_configuration: "_models.TerminalServerConfiguration", - management_network_configuration: "_models.ManagementNetworkConfigurationProperties", - annotation: Optional[str] = None, - fabric_version: Optional[str] = None, - rack_count: Optional[int] = None, - ipv6_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_sku: Supported Network Fabric SKU.Example: Compute / Aggregate racks. - Once the user chooses a particular SKU, only supported racks can be added to the Network - Fabric. The SKU determines whether it is a single / multi rack Network Fabric. Required. - :paramtype network_fabric_sku: str - :keyword fabric_version: The version of Network Fabric. - :paramtype fabric_version: str - :keyword network_fabric_controller_id: Azure resource ID for the NetworkFabricController the - NetworkFabric belongs. Required. - :paramtype network_fabric_controller_id: str - :keyword rack_count: Number of compute racks associated to Network Fabric. - :paramtype rack_count: int - :keyword server_count_per_rack: Number of servers.Possible values are from 1-16. Required. - :paramtype server_count_per_rack: int - :keyword ipv4_prefix: IPv4Prefix for Management Network. Example: 10.1.0.0/19. Required. - :paramtype ipv4_prefix: str - :keyword ipv6_prefix: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - :paramtype ipv6_prefix: str - :keyword fabric_asn: ASN of CE devices for CE/PE connectivity. Required. - :paramtype fabric_asn: int - :keyword terminal_server_configuration: Network and credentials configuration currently applied - to terminal server. Required. - :paramtype terminal_server_configuration: - ~azure.mgmt.managednetworkfabric.models.TerminalServerConfiguration - :keyword management_network_configuration: Configuration to be used to setup the management - network. Required. - :paramtype management_network_configuration: - ~azure.mgmt.managednetworkfabric.models.ManagementNetworkConfigurationProperties - """ - super().__init__(annotation=annotation, **kwargs) - self.network_fabric_sku = network_fabric_sku - self.fabric_version = fabric_version - self.router_ids: Optional[list[str]] = None - self.network_fabric_controller_id = network_fabric_controller_id - self.rack_count = rack_count - self.server_count_per_rack = server_count_per_rack - self.ipv4_prefix = ipv4_prefix - self.ipv6_prefix = ipv6_prefix - self.fabric_asn = fabric_asn - self.terminal_server_configuration = terminal_server_configuration - self.management_network_configuration = management_network_configuration - self.racks: Optional[list[str]] = None - self.l2_isolation_domains: Optional[list[str]] = None - self.l3_isolation_domains: Optional[list[str]] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkFabricSku(ProxyResource): - """The Network Fabric SKU resource definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar type_properties_type: Type of Network Fabric SKU. Known values are: "SingleRack" and - "MultiRack". - :vartype type_properties_type: str or ~azure.mgmt.managednetworkfabric.models.FabricSkuType - :ivar max_compute_racks: Maximum number of compute racks available for this Network Fabric SKU. - The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. - :vartype max_compute_racks: int - :ivar maximum_server_count: Maximum number of servers available for this Network Fabric SKU. - :vartype maximum_server_count: int - :ivar supported_versions: List of supported Network Fabric SKU versions. - :vartype supported_versions: list[str] - :ivar details: URL providing detailed configuration of the fabric SKU. - :vartype details: str - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "type_properties_type": {"readonly": True}, - "supported_versions": {"readonly": True}, - "details": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "type_properties_type": {"key": "properties.type", "type": "str"}, - "max_compute_racks": {"key": "properties.maxComputeRacks", "type": "int"}, - "maximum_server_count": {"key": "properties.maximumServerCount", "type": "int"}, - "supported_versions": {"key": "properties.supportedVersions", "type": "[str]"}, - "details": {"key": "properties.details", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, *, max_compute_racks: Optional[int] = None, maximum_server_count: Optional[int] = None, **kwargs: Any - ) -> None: - """ - :keyword max_compute_racks: Maximum number of compute racks available for this Network Fabric - SKU. The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. - :paramtype max_compute_racks: int - :keyword maximum_server_count: Maximum number of servers available for this Network Fabric SKU. - :paramtype maximum_server_count: int - """ - super().__init__(**kwargs) - self.type_properties_type: Optional[Union[str, "_models.FabricSkuType"]] = None - self.max_compute_racks = max_compute_racks - self.maximum_server_count = maximum_server_count - self.supported_versions: Optional[list[str]] = None - self.details: Optional[str] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkFabricSkusListResult(_serialization.Model): - """List of Network Fabric SKUs. - - :ivar value: List of Network Fabric SKU resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkFabricSku]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkFabricSku"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of Network Fabric SKU resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkFabricsListResult(_serialization.Model): - """List of Network Fabrics. - - :ivar value: List of Network Fabric resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkFabric]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NetworkFabric"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of Network Fabric resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkInterface(ProxyResource): - """Defines the NetworkInterface resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar physical_identifier: Physical Identifier of the network interface. - :vartype physical_identifier: str - :ivar connected_to: The ARM resource id of the interface or compute server its connected to. - :vartype connected_to: str - :ivar interface_type: The Interface Type. Example: Management/Data. Known values are: - "Management" and "Data". - :vartype interface_type: str or ~azure.mgmt.managednetworkfabric.models.InterfaceType - :ivar ipv4_address: IPv4Address of the interface. - :vartype ipv4_address: str - :ivar ipv6_address: IPv6Address of the interface. - :vartype ipv6_address: str - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "physical_identifier": {"readonly": True}, - "connected_to": {"readonly": True}, - "interface_type": {"readonly": True}, - "ipv4_address": {"readonly": True}, - "ipv6_address": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "physical_identifier": {"key": "properties.physicalIdentifier", "type": "str"}, - "connected_to": {"key": "properties.connectedTo", "type": "str"}, - "interface_type": {"key": "properties.interfaceType", "type": "str"}, - "ipv4_address": {"key": "properties.ipv4Address", "type": "str"}, - "ipv6_address": {"key": "properties.ipv6Address", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(**kwargs) - self.annotation = annotation - self.physical_identifier: Optional[str] = None - self.connected_to: Optional[str] = None - self.interface_type: Optional[Union[str, "_models.InterfaceType"]] = None - self.ipv4_address: Optional[str] = None - self.ipv6_address: Optional[str] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkInterfacePatch(_serialization.Model): - """The NetworkInterfacePatch resource definition. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _attribute_map = { - "annotation": {"key": "properties.annotation", "type": "str"}, - } - - def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(**kwargs) - self.annotation = annotation - - -class NetworkInterfacePatchProperties(AnnotationResource): - """Network Interface Patch properties. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - -class NetworkInterfaceProperties(AnnotationResource): - """Network Interface Properties defines the properties of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar physical_identifier: Physical Identifier of the network interface. - :vartype physical_identifier: str - :ivar connected_to: The ARM resource id of the interface or compute server its connected to. - :vartype connected_to: str - :ivar interface_type: The Interface Type. Example: Management/Data. Known values are: - "Management" and "Data". - :vartype interface_type: str or ~azure.mgmt.managednetworkfabric.models.InterfaceType - :ivar ipv4_address: IPv4Address of the interface. - :vartype ipv4_address: str - :ivar ipv6_address: IPv6Address of the interface. - :vartype ipv6_address: str - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "physical_identifier": {"readonly": True}, - "connected_to": {"readonly": True}, - "interface_type": {"readonly": True}, - "ipv4_address": {"readonly": True}, - "ipv6_address": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "physical_identifier": {"key": "physicalIdentifier", "type": "str"}, - "connected_to": {"key": "connectedTo", "type": "str"}, - "interface_type": {"key": "interfaceType", "type": "str"}, - "ipv4_address": {"key": "ipv4Address", "type": "str"}, - "ipv6_address": {"key": "ipv6Address", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__(self, *, annotation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__(annotation=annotation, **kwargs) - self.physical_identifier: Optional[str] = None - self.connected_to: Optional[str] = None - self.interface_type: Optional[Union[str, "_models.InterfaceType"]] = None - self.ipv4_address: Optional[str] = None - self.ipv6_address: Optional[str] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkInterfacesList(_serialization.Model): - """List of NetworkInterfaces. - - :ivar value: List of NetworkInterfaces resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkInterface]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkInterface"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkInterfaces resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkPacketBroker(TrackedResource): - """The NetworkPacketBroker resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar network_fabric_id: ARM resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar network_device_ids: List of ARM resource IDs of Network Devices [NPB]. - :vartype network_device_ids: list[str] - :ivar source_interface_ids: List of network interfaces across NPB devices that are used to - mirror source traffic. - :vartype source_interface_ids: list[str] - :ivar network_tap_ids: List of network Tap IDs configured on NPB. - :vartype network_tap_ids: list[str] - :ivar neighbor_group_ids: List of neighbor group IDs configured on NPB. - :vartype neighbor_group_ids: list[str] - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_id": {"required": True}, - "network_device_ids": {"readonly": True}, - "source_interface_ids": {"readonly": True}, - "network_tap_ids": {"readonly": True}, - "neighbor_group_ids": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, - "network_device_ids": {"key": "properties.networkDeviceIds", "type": "[str]"}, - "source_interface_ids": {"key": "properties.sourceInterfaceIds", "type": "[str]"}, - "network_tap_ids": {"key": "properties.networkTapIds", "type": "[str]"}, - "neighbor_group_ids": {"key": "properties.neighborGroupIds", "type": "[str]"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, *, location: str, network_fabric_id: str, tags: Optional[dict[str, str]] = None, **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword network_fabric_id: ARM resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.network_fabric_id = network_fabric_id - self.network_device_ids: Optional[list[str]] = None - self.source_interface_ids: Optional[list[str]] = None - self.network_tap_ids: Optional[list[str]] = None - self.neighbor_group_ids: Optional[list[str]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkPacketBrokerPatch(TagsUpdate): - """The NetworkPacketBroker patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - -class NetworkPacketBrokersListResult(_serialization.Model): - """List of NetworkPacketBrokers. - - :ivar value: List of NetworkPacketBroker resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkPacketBroker]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkPacketBroker"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkPacketBroker resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkRack(TrackedResource): - """The Network Rack resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_rack_type: Network Rack SKU name. Known values are: "Aggregate", "Compute", and - "Combined". - :vartype network_rack_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkRackType - :ivar network_fabric_id: ARM resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar network_devices: List of network device ARM resource IDs. - :vartype network_devices: list[str] - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_id": {"required": True}, - "network_devices": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_rack_type": {"key": "properties.networkRackType", "type": "str"}, - "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, - "network_devices": {"key": "properties.networkDevices", "type": "[str]"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_fabric_id: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - network_rack_type: Optional[Union[str, "_models.NetworkRackType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_rack_type: Network Rack SKU name. Known values are: "Aggregate", "Compute", - and "Combined". - :paramtype network_rack_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkRackType - :keyword network_fabric_id: ARM resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.network_rack_type = network_rack_type - self.network_fabric_id = network_fabric_id - self.network_devices: Optional[list[str]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkRackProperties(AnnotationResource): - """Network Rack Properties defines the properties of the 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 server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_rack_type: Network Rack SKU name. Known values are: "Aggregate", "Compute", and - "Combined". - :vartype network_rack_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkRackType - :ivar network_fabric_id: ARM resource ID of the Network Fabric. Required. - :vartype network_fabric_id: str - :ivar network_devices: List of network device ARM resource IDs. - :vartype network_devices: list[str] - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - """ - - _validation = { - "network_fabric_id": {"required": True}, - "network_devices": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "network_rack_type": {"key": "networkRackType", "type": "str"}, - "network_fabric_id": {"key": "networkFabricId", "type": "str"}, - "network_devices": {"key": "networkDevices", "type": "[str]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - network_fabric_id: str, - annotation: Optional[str] = None, - network_rack_type: Optional[Union[str, "_models.NetworkRackType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_rack_type: Network Rack SKU name. Known values are: "Aggregate", "Compute", - and "Combined". - :paramtype network_rack_type: str or ~azure.mgmt.managednetworkfabric.models.NetworkRackType - :keyword network_fabric_id: ARM resource ID of the Network Fabric. Required. - :paramtype network_fabric_id: str - """ - super().__init__(annotation=annotation, **kwargs) - self.network_rack_type = network_rack_type - self.network_fabric_id = network_fabric_id - self.network_devices: Optional[list[str]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class NetworkRacksListResult(_serialization.Model): - """List of Network Racks. - - :ivar value: List of Network Rack resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkRack]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NetworkRack"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of Network Rack resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkTap(TrackedResource): - """The Network Tap resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_packet_broker_id: ARM resource ID of the Network Packet Broker. Required. - :vartype network_packet_broker_id: str - :ivar source_tap_rule_id: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. - :vartype source_tap_rule_id: str - :ivar destinations: List of destinations to send the filter traffic. Required. - :vartype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem] - :ivar polling_type: Polling type. Known values are: "Pull" and "Push". - :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :ivar configuration_state: Gets the configurations state of the resource. Known values are: - "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", - "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", - and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of Network Tap provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Example -Enabled/Disabled. - Known values are: "Enabled", "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_packet_broker_id": {"required": True}, - "source_tap_rule_id": {"readonly": True}, - "destinations": {"required": True, "min_items": 1}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "network_packet_broker_id": {"key": "properties.networkPacketBrokerId", "type": "str"}, - "source_tap_rule_id": {"key": "properties.sourceTapRuleId", "type": "str"}, - "destinations": {"key": "properties.destinations", "type": "[NetworkTapPropertiesDestinationsItem]"}, - "polling_type": {"key": "properties.pollingType", "type": "str"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_packet_broker_id: str, - destinations: list["_models.NetworkTapPropertiesDestinationsItem"], - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - polling_type: Optional[Union[str, "_models.PollingType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_packet_broker_id: ARM resource ID of the Network Packet Broker. Required. - :paramtype network_packet_broker_id: str - :keyword destinations: List of destinations to send the filter traffic. Required. - :paramtype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem] - :keyword polling_type: Polling type. Known values are: "Pull" and "Push". - :paramtype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.network_packet_broker_id = network_packet_broker_id - self.source_tap_rule_id: Optional[str] = None - self.destinations = destinations - self.polling_type = polling_type - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkTapPatch(TagsUpdate): - """The NetworkFabric resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar polling_type: Polling type. Known values are: "Pull" and "Push". - :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :ivar destinations: List of destination properties to send the filter traffic. - :vartype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "polling_type": {"key": "properties.pollingType", "type": "str"}, - "destinations": {"key": "properties.destinations", "type": "[NetworkTapPatchableParametersDestinationsItem]"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - polling_type: Optional[Union[str, "_models.PollingType"]] = None, - destinations: Optional[list["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword polling_type: Polling type. Known values are: "Pull" and "Push". - :paramtype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :keyword destinations: List of destination properties to send the filter traffic. - :paramtype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem] - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.polling_type = polling_type - self.destinations = destinations - - -class NetworkTapPatchableParameters(AnnotationResource): - """The Network Tap resource patch definition. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar polling_type: Polling type. Known values are: "Pull" and "Push". - :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :ivar destinations: List of destination properties to send the filter traffic. - :vartype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem] - """ - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "polling_type": {"key": "pollingType", "type": "str"}, - "destinations": {"key": "destinations", "type": "[NetworkTapPatchableParametersDestinationsItem]"}, - } - - def __init__( - self, - *, - annotation: Optional[str] = None, - polling_type: Optional[Union[str, "_models.PollingType"]] = None, - destinations: Optional[list["_models.NetworkTapPatchableParametersDestinationsItem"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword polling_type: Polling type. Known values are: "Pull" and "Push". - :paramtype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :keyword destinations: List of destination properties to send the filter traffic. - :paramtype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem] - """ - super().__init__(annotation=annotation, **kwargs) - self.polling_type = polling_type - self.destinations = destinations - - -class NetworkTapPatchableParametersDestinationsItem(DestinationProperties): # pylint: disable=name-too-long - """Destination. - - :ivar name: Destination name. - :vartype name: str - :ivar destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :vartype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :ivar destination_id: The destination Id. ARM Resource ID of either NNI or Internal Networks. - :vartype destination_id: str - :ivar isolation_domain_properties: Isolation Domain Properties. - :vartype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :ivar destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :vartype destination_tap_rule_id: str - """ - - -class NetworkTapProperties(AnnotationResource): - """Network Tap Properties defines the properties of the 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 server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_packet_broker_id: ARM resource ID of the Network Packet Broker. Required. - :vartype network_packet_broker_id: str - :ivar source_tap_rule_id: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. - :vartype source_tap_rule_id: str - :ivar destinations: List of destinations to send the filter traffic. Required. - :vartype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem] - :ivar polling_type: Polling type. Known values are: "Pull" and "Push". - :vartype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - :ivar configuration_state: Gets the configurations state of the resource. Known values are: - "Succeeded", "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", - "Deprovisioning", "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", - and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provides you the latest status of the NFC service, whether it is - Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on - the status of Network Tap provisioning. Known values are: "Accepted", "Succeeded", "Updating", - "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Example -Enabled/Disabled. - Known values are: "Enabled", "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "network_packet_broker_id": {"required": True}, - "source_tap_rule_id": {"readonly": True}, - "destinations": {"required": True, "min_items": 1}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "network_packet_broker_id": {"key": "networkPacketBrokerId", "type": "str"}, - "source_tap_rule_id": {"key": "sourceTapRuleId", "type": "str"}, - "destinations": {"key": "destinations", "type": "[NetworkTapPropertiesDestinationsItem]"}, - "polling_type": {"key": "pollingType", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - network_packet_broker_id: str, - destinations: list["_models.NetworkTapPropertiesDestinationsItem"], - annotation: Optional[str] = None, - polling_type: Optional[Union[str, "_models.PollingType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_packet_broker_id: ARM resource ID of the Network Packet Broker. Required. - :paramtype network_packet_broker_id: str - :keyword destinations: List of destinations to send the filter traffic. Required. - :paramtype destinations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem] - :keyword polling_type: Polling type. Known values are: "Pull" and "Push". - :paramtype polling_type: str or ~azure.mgmt.managednetworkfabric.models.PollingType - """ - super().__init__(annotation=annotation, **kwargs) - self.network_packet_broker_id = network_packet_broker_id - self.source_tap_rule_id: Optional[str] = None - self.destinations = destinations - self.polling_type = polling_type - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkTapPropertiesDestinationsItem(DestinationProperties): - """Destination. - - :ivar name: Destination name. - :vartype name: str - :ivar destination_type: Type of destination. Input can be IsolationDomain or Direct. Known - values are: "IsolationDomain" and "Direct". - :vartype destination_type: str or ~azure.mgmt.managednetworkfabric.models.DestinationType - :ivar destination_id: The destination Id. ARM Resource ID of either NNI or Internal Networks. - :vartype destination_id: str - :ivar isolation_domain_properties: Isolation Domain Properties. - :vartype isolation_domain_properties: - ~azure.mgmt.managednetworkfabric.models.IsolationDomainProperties - :ivar destination_tap_rule_id: ARM Resource ID of destination Tap Rule that contains match - configurations. - :vartype destination_tap_rule_id: str - """ - - -class NetworkTapRule(TrackedResource): - """The NetworkTapRule resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" - and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar tap_rules_url: Network Tap Rules file URL. - :vartype tap_rules_url: str - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar network_tap_id: The ARM resource Id of the NetworkTap. - :vartype network_tap_id: str - :ivar polling_interval_in_seconds: Polling interval in seconds. Known values are: 30, 60, 90, - and 120. - :vartype polling_interval_in_seconds: int or - ~azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds - :ivar last_synced_time: The last sync timestamp. - :vartype last_synced_time: ~datetime.datetime - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "tap_rules_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - "network_tap_id": {"readonly": True}, - "last_synced_time": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "configuration_type": {"key": "properties.configurationType", "type": "str"}, - "tap_rules_url": {"key": "properties.tapRulesUrl", "type": "str"}, - "match_configurations": {"key": "properties.matchConfigurations", "type": "[NetworkTapRuleMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "properties.dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "network_tap_id": {"key": "properties.networkTapId", "type": "str"}, - "polling_interval_in_seconds": {"key": "properties.pollingIntervalInSeconds", "type": "int"}, - "last_synced_time": {"key": "properties.lastSyncedTime", "type": "iso-8601"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - tap_rules_url: Optional[str] = None, - match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - polling_interval_in_seconds: Union[int, "_models.PollingIntervalInSeconds"] = 30, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword configuration_type: Input method to configure Network Tap Rule. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword tap_rules_url: Network Tap Rules file URL. - :paramtype tap_rules_url: str - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :keyword polling_interval_in_seconds: Polling interval in seconds. Known values are: 30, 60, - 90, and 120. - :paramtype polling_interval_in_seconds: int or - ~azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.configuration_type = configuration_type - self.tap_rules_url = tap_rules_url - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.network_tap_id: Optional[str] = None - self.polling_interval_in_seconds = polling_interval_in_seconds - self.last_synced_time: Optional[datetime.datetime] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkTapRuleAction(_serialization.Model): - """Action that need to performed. - - :ivar type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", - "Replicate", "Goto", "Redirect", and "Mirror". - :vartype type: str or ~azure.mgmt.managednetworkfabric.models.TapRuleActionType - :ivar truncate: Truncate. 0 indicates do not truncate. - :vartype truncate: str - :ivar is_timestamp_enabled: The parameter to enable or disable the timestamp. Known values are: - "True" and "False". - :vartype is_timestamp_enabled: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :ivar destination_id: Destination Id. The ARM resource Id may be either Network To Network - Interconnect or NeighborGroup. - :vartype destination_id: str - :ivar match_configuration_name: The name of the match configuration. This is used when Goto - type is provided. If Goto type is selected and no match configuration name is provided. It goes - to next configuration. - :vartype match_configuration_name: str - """ - - _validation = { - "truncate": {"min_length": 1}, - "match_configuration_name": {"min_length": 1}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "truncate": {"key": "truncate", "type": "str"}, - "is_timestamp_enabled": {"key": "isTimestampEnabled", "type": "str"}, - "destination_id": {"key": "destinationId", "type": "str"}, - "match_configuration_name": {"key": "matchConfigurationName", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.TapRuleActionType"]] = None, - truncate: Optional[str] = None, - is_timestamp_enabled: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, - destination_id: Optional[str] = None, - match_configuration_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: Type of actions that can be performed. Known values are: "Drop", "Count", "Log", - "Replicate", "Goto", "Redirect", and "Mirror". - :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.TapRuleActionType - :keyword truncate: Truncate. 0 indicates do not truncate. - :paramtype truncate: str - :keyword is_timestamp_enabled: The parameter to enable or disable the timestamp. Known values - are: "True" and "False". - :paramtype is_timestamp_enabled: str or - ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :keyword destination_id: Destination Id. The ARM resource Id may be either Network To Network - Interconnect or NeighborGroup. - :paramtype destination_id: str - :keyword match_configuration_name: The name of the match configuration. This is used when Goto - type is provided. If Goto type is selected and no match configuration name is provided. It goes - to next configuration. - :paramtype match_configuration_name: str - """ - super().__init__(**kwargs) - self.type = type - self.truncate = truncate - self.is_timestamp_enabled = is_timestamp_enabled - self.destination_id = destination_id - self.match_configuration_name = match_configuration_name - - -class NetworkTapRuleMatchCondition(CommonMatchConditions): - """Defines the match condition that is supported to filter the traffic. - - :ivar protocol_types: List of the protocols that need to be matched. - :vartype protocol_types: list[str] - :ivar vlan_match_condition: Vlan match condition that needs to be matched. - :vartype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :ivar ip_condition: IP condition that needs to be matched. - :vartype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :ivar encapsulation_type: Encapsulation Type that needs to be matched. Known values are: "None" - and "GTPv1". - :vartype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType - :ivar port_condition: Defines the port condition that needs to be matched. - :vartype port_condition: ~azure.mgmt.managednetworkfabric.models.PortCondition - """ - - _validation = { - "protocol_types": {"min_items": 1}, - } - - _attribute_map = { - "protocol_types": {"key": "protocolTypes", "type": "[str]"}, - "vlan_match_condition": {"key": "vlanMatchCondition", "type": "VlanMatchCondition"}, - "ip_condition": {"key": "ipCondition", "type": "IpMatchCondition"}, - "encapsulation_type": {"key": "encapsulationType", "type": "str"}, - "port_condition": {"key": "portCondition", "type": "PortCondition"}, - } - - def __init__( - self, - *, - protocol_types: Optional[list[str]] = None, - vlan_match_condition: Optional["_models.VlanMatchCondition"] = None, - ip_condition: Optional["_models.IpMatchCondition"] = None, - encapsulation_type: Union[str, "_models.EncapsulationType"] = "None", - port_condition: Optional["_models.PortCondition"] = None, - **kwargs: Any - ) -> None: - """ - :keyword protocol_types: List of the protocols that need to be matched. - :paramtype protocol_types: list[str] - :keyword vlan_match_condition: Vlan match condition that needs to be matched. - :paramtype vlan_match_condition: ~azure.mgmt.managednetworkfabric.models.VlanMatchCondition - :keyword ip_condition: IP condition that needs to be matched. - :paramtype ip_condition: ~azure.mgmt.managednetworkfabric.models.IpMatchCondition - :keyword encapsulation_type: Encapsulation Type that needs to be matched. Known values are: - "None" and "GTPv1". - :paramtype encapsulation_type: str or ~azure.mgmt.managednetworkfabric.models.EncapsulationType - :keyword port_condition: Defines the port condition that needs to be matched. - :paramtype port_condition: ~azure.mgmt.managednetworkfabric.models.PortCondition - """ - super().__init__( - protocol_types=protocol_types, - vlan_match_condition=vlan_match_condition, - ip_condition=ip_condition, - **kwargs - ) - self.encapsulation_type = encapsulation_type - self.port_condition = port_condition - - -class NetworkTapRuleMatchConfiguration(_serialization.Model): - """Defines the match configuration that are supported to filter the traffic. - - :ivar match_configuration_name: The name of the match configuration. - :vartype match_configuration_name: str - :ivar sequence_number: Sequence Number of the match configuration.. - :vartype sequence_number: int - :ivar ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and "IPv6". - :vartype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :ivar match_conditions: List of the match conditions. - :vartype match_conditions: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition] - :ivar actions: List of actions that need to be performed for the matched conditions. - :vartype actions: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction] - """ - - _validation = { - "match_configuration_name": {"min_length": 1}, - "sequence_number": {"maximum": 4294967295, "minimum": 1}, - "match_conditions": {"min_items": 1}, - "actions": {"min_items": 1}, - } - - _attribute_map = { - "match_configuration_name": {"key": "matchConfigurationName", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "ip_address_type": {"key": "ipAddressType", "type": "str"}, - "match_conditions": {"key": "matchConditions", "type": "[NetworkTapRuleMatchCondition]"}, - "actions": {"key": "actions", "type": "[NetworkTapRuleAction]"}, - } - - def __init__( - self, - *, - match_configuration_name: Optional[str] = None, - sequence_number: Optional[int] = None, - ip_address_type: Optional[Union[str, "_models.IPAddressType"]] = None, - match_conditions: Optional[list["_models.NetworkTapRuleMatchCondition"]] = None, - actions: Optional[list["_models.NetworkTapRuleAction"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword match_configuration_name: The name of the match configuration. - :paramtype match_configuration_name: str - :keyword sequence_number: Sequence Number of the match configuration.. - :paramtype sequence_number: int - :keyword ip_address_type: Type of IP Address. IPv4 or IPv6. Known values are: "IPv4" and - "IPv6". - :paramtype ip_address_type: str or ~azure.mgmt.managednetworkfabric.models.IPAddressType - :keyword match_conditions: List of the match conditions. - :paramtype match_conditions: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchCondition] - :keyword actions: List of actions that need to be performed for the matched conditions. - :paramtype actions: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleAction] - """ - super().__init__(**kwargs) - self.match_configuration_name = match_configuration_name - self.sequence_number = sequence_number - self.ip_address_type = ip_address_type - self.match_conditions = match_conditions - self.actions = actions - - -class NetworkTapRulePatch(TagsUpdate): - """The NetworkTapRule resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" - and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar tap_rules_url: Network Tap Rules file URL. - :vartype tap_rules_url: str - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - - _validation = { - "tap_rules_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "configuration_type": {"key": "properties.configurationType", "type": "str"}, - "tap_rules_url": {"key": "properties.tapRulesUrl", "type": "str"}, - "match_configurations": {"key": "properties.matchConfigurations", "type": "[NetworkTapRuleMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "properties.dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - tap_rules_url: Optional[str] = None, - match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword configuration_type: Input method to configure Network Tap Rule. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword tap_rules_url: Network Tap Rules file URL. - :paramtype tap_rules_url: str - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - super().__init__(tags=tags, **kwargs) - self.annotation = annotation - self.configuration_type = configuration_type - self.tap_rules_url = tap_rules_url - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - - -class NetworkTapRulePatchableProperties(_serialization.Model): - """Network Tap Rule updatable properties. - - :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" - and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar tap_rules_url: Network Tap Rules file URL. - :vartype tap_rules_url: str - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - - _validation = { - "tap_rules_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "configuration_type": {"key": "configurationType", "type": "str"}, - "tap_rules_url": {"key": "tapRulesUrl", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[NetworkTapRuleMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - } - - def __init__( - self, - *, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - tap_rules_url: Optional[str] = None, - match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword configuration_type: Input method to configure Network Tap Rule. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword tap_rules_url: Network Tap Rules file URL. - :paramtype tap_rules_url: str - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - """ - super().__init__(**kwargs) - self.configuration_type = configuration_type - self.tap_rules_url = tap_rules_url - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - - -class NetworkTapRulePatchProperties(AnnotationResource, NetworkTapRulePatchableProperties): - """Network Tap Rule Patch properties. - - :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" - and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar tap_rules_url: Network Tap Rules file URL. - :vartype tap_rules_url: str - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar annotation: Switch configuration description. - :vartype annotation: str - """ - - _validation = { - "tap_rules_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - } - - _attribute_map = { - "configuration_type": {"key": "configurationType", "type": "str"}, - "tap_rules_url": {"key": "tapRulesUrl", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[NetworkTapRuleMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "annotation": {"key": "annotation", "type": "str"}, - } - - def __init__( - self, - *, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - tap_rules_url: Optional[str] = None, - match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword configuration_type: Input method to configure Network Tap Rule. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword tap_rules_url: Network Tap Rules file URL. - :paramtype tap_rules_url: str - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - """ - super().__init__( - annotation=annotation, - configuration_type=configuration_type, - tap_rules_url=tap_rules_url, - match_configurations=match_configurations, - dynamic_match_configurations=dynamic_match_configurations, - **kwargs - ) - self.configuration_type = configuration_type - self.tap_rules_url = tap_rules_url - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.annotation = annotation - - -class NetworkTapRuleProperties(AnnotationResource, NetworkTapRulePatchableProperties): - """Network Tap Rule Properties defines the resource properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar configuration_type: Input method to configure Network Tap Rule. Known values are: "File" - and "Inline". - :vartype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :ivar tap_rules_url: Network Tap Rules file URL. - :vartype tap_rules_url: str - :ivar match_configurations: List of match configurations. - :vartype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :ivar dynamic_match_configurations: List of dynamic match configurations. - :vartype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_tap_id: The ARM resource Id of the NetworkTap. - :vartype network_tap_id: str - :ivar polling_interval_in_seconds: Polling interval in seconds. Known values are: 30, 60, 90, - and 120. - :vartype polling_interval_in_seconds: int or - ~azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds - :ivar last_synced_time: The last sync timestamp. - :vartype last_synced_time: ~datetime.datetime - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "tap_rules_url": {"min_length": 1}, - "match_configurations": {"min_items": 1}, - "dynamic_match_configurations": {"min_items": 1}, - "network_tap_id": {"readonly": True}, - "last_synced_time": {"readonly": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "configuration_type": {"key": "configurationType", "type": "str"}, - "tap_rules_url": {"key": "tapRulesUrl", "type": "str"}, - "match_configurations": {"key": "matchConfigurations", "type": "[NetworkTapRuleMatchConfiguration]"}, - "dynamic_match_configurations": { - "key": "dynamicMatchConfigurations", - "type": "[CommonDynamicMatchConfiguration]", - }, - "annotation": {"key": "annotation", "type": "str"}, - "network_tap_id": {"key": "networkTapId", "type": "str"}, - "polling_interval_in_seconds": {"key": "pollingIntervalInSeconds", "type": "int"}, - "last_synced_time": {"key": "lastSyncedTime", "type": "iso-8601"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - configuration_type: Optional[Union[str, "_models.ConfigurationType"]] = None, - tap_rules_url: Optional[str] = None, - match_configurations: Optional[list["_models.NetworkTapRuleMatchConfiguration"]] = None, - dynamic_match_configurations: Optional[list["_models.CommonDynamicMatchConfiguration"]] = None, - annotation: Optional[str] = None, - polling_interval_in_seconds: Union[int, "_models.PollingIntervalInSeconds"] = 30, - **kwargs: Any - ) -> None: - """ - :keyword configuration_type: Input method to configure Network Tap Rule. Known values are: - "File" and "Inline". - :paramtype configuration_type: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationType - :keyword tap_rules_url: Network Tap Rules file URL. - :paramtype tap_rules_url: str - :keyword match_configurations: List of match configurations. - :paramtype match_configurations: - list[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleMatchConfiguration] - :keyword dynamic_match_configurations: List of dynamic match configurations. - :paramtype dynamic_match_configurations: - list[~azure.mgmt.managednetworkfabric.models.CommonDynamicMatchConfiguration] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword polling_interval_in_seconds: Polling interval in seconds. Known values are: 30, 60, - 90, and 120. - :paramtype polling_interval_in_seconds: int or - ~azure.mgmt.managednetworkfabric.models.PollingIntervalInSeconds - """ - super().__init__( - annotation=annotation, - configuration_type=configuration_type, - tap_rules_url=tap_rules_url, - match_configurations=match_configurations, - dynamic_match_configurations=dynamic_match_configurations, - **kwargs - ) - self.configuration_type = configuration_type - self.tap_rules_url = tap_rules_url - self.match_configurations = match_configurations - self.dynamic_match_configurations = dynamic_match_configurations - self.network_tap_id: Optional[str] = None - self.polling_interval_in_seconds = polling_interval_in_seconds - self.last_synced_time: Optional[datetime.datetime] = None - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class NetworkTapRulesListResult(_serialization.Model): - """List of NetworkTapRules. - - :ivar value: List of NetworkTapRule resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkTapRule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NetworkTapRule"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkTapRule resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkTapsListResult(_serialization.Model): - """List of NetworkTaps. - - :ivar value: List of NetworkTap resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkTap]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.NetworkTap"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkTap resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkToNetworkInterconnect(ProxyResource): - """The Network To Network Interconnect resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar nni_type: Type of NNI used. Example: CE | NPB. Known values are: "CE" and "NPB". - :vartype nni_type: str or ~azure.mgmt.managednetworkfabric.models.NniType - :ivar is_management_type: Configuration to use NNI for Infrastructure Management. Example: - True/False. Known values are: "True" and "False". - :vartype is_management_type: str or ~azure.mgmt.managednetworkfabric.models.IsManagementType - :ivar use_option_b: Based on this option layer3 parameters are mandatory. Example: True/False. - Required. Known values are: "True" and "False". - :vartype use_option_b: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :ivar layer2_configuration: Common properties for Layer2 Configuration. - :vartype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2Configuration - :ivar option_b_layer3_configuration: Common properties for Layer3Configuration. - :vartype option_b_layer3_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - :ivar npb_static_route_configuration: NPB Static Route Configuration properties. - :vartype npb_static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration - :ivar import_route_policy: Import Route Policy configuration. - :vartype import_route_policy: - ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation - :ivar export_route_policy: Export Route Policy configuration. - :vartype export_route_policy: - ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "use_option_b": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "nni_type": {"key": "properties.nniType", "type": "str"}, - "is_management_type": {"key": "properties.isManagementType", "type": "str"}, - "use_option_b": {"key": "properties.useOptionB", "type": "str"}, - "layer2_configuration": {"key": "properties.layer2Configuration", "type": "Layer2Configuration"}, - "option_b_layer3_configuration": { - "key": "properties.optionBLayer3Configuration", - "type": "NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration", - }, - "npb_static_route_configuration": { - "key": "properties.npbStaticRouteConfiguration", - "type": "NpbStaticRouteConfiguration", - }, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicyInformation"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicyInformation"}, - "egress_acl_id": {"key": "properties.egressAclId", "type": "str"}, - "ingress_acl_id": {"key": "properties.ingressAclId", "type": "str"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - use_option_b: Union[str, "_models.BooleanEnumProperty"], - nni_type: Union[str, "_models.NniType"] = "CE", - is_management_type: Union[str, "_models.IsManagementType"] = "True", - layer2_configuration: Optional["_models.Layer2Configuration"] = None, - option_b_layer3_configuration: Optional[ - "_models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration" - ] = None, - npb_static_route_configuration: Optional["_models.NpbStaticRouteConfiguration"] = None, - import_route_policy: Optional["_models.ImportRoutePolicyInformation"] = None, - export_route_policy: Optional["_models.ExportRoutePolicyInformation"] = None, - egress_acl_id: Optional[str] = None, - ingress_acl_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword nni_type: Type of NNI used. Example: CE | NPB. Known values are: "CE" and "NPB". - :paramtype nni_type: str or ~azure.mgmt.managednetworkfabric.models.NniType - :keyword is_management_type: Configuration to use NNI for Infrastructure Management. Example: - True/False. Known values are: "True" and "False". - :paramtype is_management_type: str or ~azure.mgmt.managednetworkfabric.models.IsManagementType - :keyword use_option_b: Based on this option layer3 parameters are mandatory. Example: - True/False. Required. Known values are: "True" and "False". - :paramtype use_option_b: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - :keyword layer2_configuration: Common properties for Layer2 Configuration. - :paramtype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2Configuration - :keyword option_b_layer3_configuration: Common properties for Layer3Configuration. - :paramtype option_b_layer3_configuration: - ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration - :keyword npb_static_route_configuration: NPB Static Route Configuration properties. - :paramtype npb_static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration - :keyword import_route_policy: Import Route Policy configuration. - :paramtype import_route_policy: - ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation - :keyword export_route_policy: Export Route Policy configuration. - :paramtype export_route_policy: - ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - """ - super().__init__(**kwargs) - self.nni_type = nni_type - self.is_management_type = is_management_type - self.use_option_b = use_option_b - self.layer2_configuration = layer2_configuration - self.option_b_layer3_configuration = option_b_layer3_configuration - self.npb_static_route_configuration = npb_static_route_configuration - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.egress_acl_id = egress_acl_id - self.ingress_acl_id = ingress_acl_id - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class NetworkToNetworkInterconnectPatch(ProxyResource): - """The Network To Network Interconnect resource patch definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar layer2_configuration: Common properties for Layer2Configuration. - :vartype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2Configuration - :ivar option_b_layer3_configuration: Common properties for Layer3Configuration. - :vartype option_b_layer3_configuration: - ~azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration - :ivar npb_static_route_configuration: NPB Static Route Configuration properties. - :vartype npb_static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration - :ivar import_route_policy: Import Route Policy information. - :vartype import_route_policy: - ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation - :ivar export_route_policy: Export Route Policy information. - :vartype export_route_policy: - ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation - :ivar egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :vartype egress_acl_id: str - :ivar ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :vartype ingress_acl_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "layer2_configuration": {"key": "properties.layer2Configuration", "type": "Layer2Configuration"}, - "option_b_layer3_configuration": { - "key": "properties.optionBLayer3Configuration", - "type": "OptionBLayer3Configuration", - }, - "npb_static_route_configuration": { - "key": "properties.npbStaticRouteConfiguration", - "type": "NpbStaticRouteConfiguration", - }, - "import_route_policy": {"key": "properties.importRoutePolicy", "type": "ImportRoutePolicyInformation"}, - "export_route_policy": {"key": "properties.exportRoutePolicy", "type": "ExportRoutePolicyInformation"}, - "egress_acl_id": {"key": "properties.egressAclId", "type": "str"}, - "ingress_acl_id": {"key": "properties.ingressAclId", "type": "str"}, - } - - def __init__( - self, - *, - layer2_configuration: Optional["_models.Layer2Configuration"] = None, - option_b_layer3_configuration: Optional["_models.OptionBLayer3Configuration"] = None, - npb_static_route_configuration: Optional["_models.NpbStaticRouteConfiguration"] = None, - import_route_policy: Optional["_models.ImportRoutePolicyInformation"] = None, - export_route_policy: Optional["_models.ExportRoutePolicyInformation"] = None, - egress_acl_id: Optional[str] = None, - ingress_acl_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword layer2_configuration: Common properties for Layer2Configuration. - :paramtype layer2_configuration: ~azure.mgmt.managednetworkfabric.models.Layer2Configuration - :keyword option_b_layer3_configuration: Common properties for Layer3Configuration. - :paramtype option_b_layer3_configuration: - ~azure.mgmt.managednetworkfabric.models.OptionBLayer3Configuration - :keyword npb_static_route_configuration: NPB Static Route Configuration properties. - :paramtype npb_static_route_configuration: - ~azure.mgmt.managednetworkfabric.models.NpbStaticRouteConfiguration - :keyword import_route_policy: Import Route Policy information. - :paramtype import_route_policy: - ~azure.mgmt.managednetworkfabric.models.ImportRoutePolicyInformation - :keyword export_route_policy: Export Route Policy information. - :paramtype export_route_policy: - ~azure.mgmt.managednetworkfabric.models.ExportRoutePolicyInformation - :keyword egress_acl_id: Egress Acl. ARM resource ID of Access Control Lists. - :paramtype egress_acl_id: str - :keyword ingress_acl_id: Ingress Acl. ARM resource ID of Access Control Lists. - :paramtype ingress_acl_id: str - """ - super().__init__(**kwargs) - self.layer2_configuration = layer2_configuration - self.option_b_layer3_configuration = option_b_layer3_configuration - self.npb_static_route_configuration = npb_static_route_configuration - self.import_route_policy = import_route_policy - self.export_route_policy = export_route_policy - self.egress_acl_id = egress_acl_id - self.ingress_acl_id = ingress_acl_id - - -class OptionBLayer3Configuration(Layer3IpPrefixProperties): - """OptionB Layer3 Configuration properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. - :vartype peer_asn: int - :ivar vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. - :vartype vlan_id: int - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. - :vartype fabric_asn: int - """ - - _validation = { - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - "vlan_id": {"maximum": 4094, "minimum": 100}, - "fabric_asn": {"readonly": True}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "fabric_asn": {"key": "fabricASN", "type": "int"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - peer_asn: Optional[int] = None, - vlan_id: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. - :paramtype peer_asn: int - :keyword vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. - :paramtype vlan_id: int - """ - super().__init__( - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - **kwargs - ) - self.peer_asn = peer_asn - self.vlan_id = vlan_id - self.fabric_asn: Optional[int] = None - - -class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration( - OptionBLayer3Configuration -): # pylint: disable=name-too-long - """Common properties for Layer3Configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar peer_asn: ASN of PE devices for CE/PE connectivity.Example : 28. - :vartype peer_asn: int - :ivar vlan_id: VLAN for CE/PE Layer 3 connectivity.Example : 501. - :vartype vlan_id: int - :ivar fabric_asn: ASN of CE devices for CE/PE connectivity. - :vartype fabric_asn: int - """ - - -class NetworkToNetworkInterconnectsList(_serialization.Model): - """List of Network To Network Interconnects. - - :ivar value: List of NetworkToNetworkInterconnects resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[NetworkToNetworkInterconnect]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.NetworkToNetworkInterconnect"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: List of NetworkToNetworkInterconnects resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NpbStaticRouteConfiguration(_serialization.Model): - """NPB Static Route Configuration properties. - - :ivar bfd_configuration: BFD Configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :ivar ipv4_routes: List of IPv4 Routes. - :vartype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :ivar ipv6_routes: List of IPv6 Routes. - :vartype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - - _validation = { - "ipv4_routes": {"min_items": 1}, - "ipv6_routes": {"min_items": 1}, - } - - _attribute_map = { - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - "ipv4_routes": {"key": "ipv4Routes", "type": "[StaticRouteProperties]"}, - "ipv6_routes": {"key": "ipv6Routes", "type": "[StaticRouteProperties]"}, - } - - def __init__( - self, - *, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - ipv4_routes: Optional[list["_models.StaticRouteProperties"]] = None, - ipv6_routes: Optional[list["_models.StaticRouteProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword bfd_configuration: BFD Configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - :keyword ipv4_routes: List of IPv4 Routes. - :paramtype ipv4_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - :keyword ipv6_routes: List of IPv6 Routes. - :paramtype ipv6_routes: list[~azure.mgmt.managednetworkfabric.models.StaticRouteProperties] - """ - super().__init__(**kwargs) - self.bfd_configuration = bfd_configuration - self.ipv4_routes = ipv4_routes - self.ipv6_routes = ipv6_routes - - -class Operation(_serialization.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for ARM/control-plane operations. - :vartype is_data_action: bool - :ivar display: Localized display information for this particular operation. - :vartype display: ~azure.mgmt.managednetworkfabric.models.OperationDisplay - :ivar origin: The intended executor of the operation; as in Resource Based Access Control - (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", - and "user,system". - :vartype origin: str or ~azure.mgmt.managednetworkfabric.models.Origin - :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for - internal only APIs. "Internal" - :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.ActionType - """ - - _validation = { - "name": {"readonly": True}, - "is_data_action": {"readonly": True}, - "origin": {"readonly": True}, - "action_type": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "is_data_action": {"key": "isDataAction", "type": "bool"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "action_type": {"key": "actionType", "type": "str"}, - } - - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: - """ - :keyword display: Localized display information for this particular operation. - :paramtype display: ~azure.mgmt.managednetworkfabric.models.OperationDisplay - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.is_data_action: Optional[bool] = None - self.display = display - self.origin: Optional[Union[str, "_models.Origin"]] = None - self.action_type: Optional[Union[str, "_models.ActionType"]] = None - - -class OperationDisplay(_serialization.Model): - """Localized display information for this particular operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft - Monitoring Insights" or "Microsoft Compute". - :vartype provider: str - :ivar resource: The localized friendly name of the resource type related to this operation. - E.g. "Virtual Machines" or "Job Schedule Collections". - :vartype resource: str - :ivar operation: The concise, localized friendly name for the operation; suitable for - dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - :vartype operation: str - :ivar description: The short, localized friendly description of the operation; suitable for - tool tips and detailed views. - :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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provider: Optional[str] = None - self.resource: Optional[str] = None - self.operation: Optional[str] = None - self.description: Optional[str] = None - - -class OperationListResult(_serialization.Model): - """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link - to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.Operation] - :ivar next_link: URL to get the next set of operation list results (if there are any). - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Operation"]] = None - self.next_link: Optional[str] = None - - -class OptionAProperties(_serialization.Model): - """Peering optionA properties. - - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan Id.Example : 501. - :vartype vlan_id: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD Configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - } - - def __init__( - self, - *, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan Id.Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD Configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - super().__init__(**kwargs) - self.mtu = mtu - self.vlan_id = vlan_id - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration - - -class OptionBProperties(_serialization.Model): - """Option B configuration to be used for Management VPN. - - :ivar import_route_targets: Route Targets to be applied for incoming routes into CE. This is - for backward compatibility. - :vartype import_route_targets: list[str] - :ivar export_route_targets: Route Targets to be applied for outgoing routes from CE. This is - for backward compatibility. - :vartype export_route_targets: list[str] - :ivar route_targets: Route Targets to be applied. - :vartype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation - """ - - _attribute_map = { - "import_route_targets": {"key": "importRouteTargets", "type": "[str]"}, - "export_route_targets": {"key": "exportRouteTargets", "type": "[str]"}, - "route_targets": {"key": "routeTargets", "type": "RouteTargetInformation"}, - } - - def __init__( - self, - *, - import_route_targets: Optional[list[str]] = None, - export_route_targets: Optional[list[str]] = None, - route_targets: Optional["_models.RouteTargetInformation"] = None, - **kwargs: Any - ) -> None: - """ - :keyword import_route_targets: Route Targets to be applied for incoming routes into CE. This is - for backward compatibility. - :paramtype import_route_targets: list[str] - :keyword export_route_targets: Route Targets to be applied for outgoing routes from CE. This is - for backward compatibility. - :paramtype export_route_targets: list[str] - :keyword route_targets: Route Targets to be applied. - :paramtype route_targets: ~azure.mgmt.managednetworkfabric.models.RouteTargetInformation - """ - super().__init__(**kwargs) - self.import_route_targets = import_route_targets - self.export_route_targets = export_route_targets - self.route_targets = route_targets - - -class PortGroupProperties(_serialization.Model): - """Port Group properties. - - :ivar name: The name of the port group. - :vartype name: str - :ivar ports: List of the ports that need to be matched. - :vartype ports: list[str] - """ - - _validation = { - "name": {"min_length": 1}, - "ports": {"min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "ports": {"key": "ports", "type": "[str]"}, - } - - def __init__(self, *, name: Optional[str] = None, ports: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of the port group. - :paramtype name: str - :keyword ports: List of the ports that need to be matched. - :paramtype ports: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.ports = ports - - -class RebootProperties(_serialization.Model): - """Reboot properties. - - :ivar reboot_type: Type of reboot to be performed. Example: GracefulRebootWithZTP. Known values - are: "GracefulRebootWithZTP", "GracefulRebootWithoutZTP", "UngracefulRebootWithZTP", and - "UngracefulRebootWithoutZTP". - :vartype reboot_type: str or ~azure.mgmt.managednetworkfabric.models.RebootType - """ - - _attribute_map = { - "reboot_type": {"key": "rebootType", "type": "str"}, - } - - def __init__(self, *, reboot_type: Optional[Union[str, "_models.RebootType"]] = None, **kwargs: Any) -> None: - """ - :keyword reboot_type: Type of reboot to be performed. Example: GracefulRebootWithZTP. Known - values are: "GracefulRebootWithZTP", "GracefulRebootWithoutZTP", "UngracefulRebootWithZTP", and - "UngracefulRebootWithoutZTP". - :paramtype reboot_type: str or ~azure.mgmt.managednetworkfabric.models.RebootType - """ - super().__init__(**kwargs) - self.reboot_type = reboot_type - - -class RoutePoliciesListResult(_serialization.Model): - """List of RoutePolicies. - - :ivar value: List of RoutePolicy resources. - :vartype value: list[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :ivar next_link: Url to follow for getting next page of resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RoutePolicy]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.RoutePolicy"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: List of RoutePolicy resources. - :paramtype value: list[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :keyword next_link: Url to follow for getting next page of resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RoutePolicy(TrackedResource): - """The RoutePolicy resource definition. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.managednetworkfabric.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar statements: Route Policy statements. - :vartype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - :ivar network_fabric_id: Arm Resource ID of Network Fabric. Required. - :vartype network_fabric_id: str - :ivar address_family_type: AddressFamilyType. This parameter decides whether the given ipv4 or - ipv6 route policy. Known values are: "IPv4" and "IPv6". - :vartype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "network_fabric_id": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "annotation": {"key": "properties.annotation", "type": "str"}, - "default_action": {"key": "properties.defaultAction", "type": "str"}, - "statements": {"key": "properties.statements", "type": "[RoutePolicyStatementProperties]"}, - "network_fabric_id": {"key": "properties.networkFabricId", "type": "str"}, - "address_family_type": {"key": "properties.addressFamilyType", "type": "str"}, - "configuration_state": {"key": "properties.configurationState", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "administrative_state": {"key": "properties.administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - location: str, - network_fabric_id: str, - tags: Optional[dict[str, str]] = None, - annotation: Optional[str] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, - address_family_type: Union[str, "_models.AddressFamilyType"] = "IPv4", - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword statements: Route Policy statements. - :paramtype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - :keyword network_fabric_id: Arm Resource ID of Network Fabric. Required. - :paramtype network_fabric_id: str - :keyword address_family_type: AddressFamilyType. This parameter decides whether the given ipv4 - or ipv6 route policy. Known values are: "IPv4" and "IPv6". - :paramtype address_family_type: str or - ~azure.mgmt.managednetworkfabric.models.AddressFamilyType - """ - super().__init__(tags=tags, location=location, **kwargs) - self.annotation = annotation - self.default_action = default_action - self.statements = statements - self.network_fabric_id = network_fabric_id - self.address_family_type = address_family_type - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - - -class RoutePolicyPatch(TagsUpdate): - """The Route Policy patch resource definition. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar statements: Route Policy statements. - :vartype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "default_action": {"key": "properties.defaultAction", "type": "str"}, - "statements": {"key": "properties.statements", "type": "[RoutePolicyStatementProperties]"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword statements: Route Policy statements. - :paramtype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - """ - super().__init__(tags=tags, **kwargs) - self.default_action = default_action - self.statements = statements - - -class RoutePolicyPatchableProperties(_serialization.Model): - """Route Policy patchable properties. - - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar statements: Route Policy statements. - :vartype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - """ - - _attribute_map = { - "default_action": {"key": "defaultAction", "type": "str"}, - "statements": {"key": "statements", "type": "[RoutePolicyStatementProperties]"}, - } - - def __init__( - self, - *, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword statements: Route Policy statements. - :paramtype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - """ - super().__init__(**kwargs) - self.default_action = default_action - self.statements = statements - - -class RoutePolicyProperties(AnnotationResource, RoutePolicyPatchableProperties): - """RoutePolicyProperties defines the resource 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 server. - - :ivar default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :vartype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :ivar statements: Route Policy statements. - :vartype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar network_fabric_id: Arm Resource ID of Network Fabric. Required. - :vartype network_fabric_id: str - :ivar address_family_type: AddressFamilyType. This parameter decides whether the given ipv4 or - ipv6 route policy. Known values are: "IPv4" and "IPv6". - :vartype address_family_type: str or ~azure.mgmt.managednetworkfabric.models.AddressFamilyType - :ivar configuration_state: Configuration state of the resource. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Accepted", - "Succeeded", "Updating", "Deleting", "Failed", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.managednetworkfabric.models.ProvisioningState - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - """ - - _validation = { - "network_fabric_id": {"required": True}, - "configuration_state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "administrative_state": {"readonly": True}, - } - - _attribute_map = { - "default_action": {"key": "defaultAction", "type": "str"}, - "statements": {"key": "statements", "type": "[RoutePolicyStatementProperties]"}, - "annotation": {"key": "annotation", "type": "str"}, - "network_fabric_id": {"key": "networkFabricId", "type": "str"}, - "address_family_type": {"key": "addressFamilyType", "type": "str"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - } - - def __init__( - self, - *, - network_fabric_id: str, - default_action: Optional[Union[str, "_models.CommunityActionTypes"]] = None, - statements: Optional[list["_models.RoutePolicyStatementProperties"]] = None, - annotation: Optional[str] = None, - address_family_type: Union[str, "_models.AddressFamilyType"] = "IPv4", - **kwargs: Any - ) -> None: - """ - :keyword default_action: Default action that needs to be applied when no condition is matched. - Example: Permit | Deny. Known values are: "Permit" and "Deny". - :paramtype default_action: str or ~azure.mgmt.managednetworkfabric.models.CommunityActionTypes - :keyword statements: Route Policy statements. - :paramtype statements: - list[~azure.mgmt.managednetworkfabric.models.RoutePolicyStatementProperties] - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword network_fabric_id: Arm Resource ID of Network Fabric. Required. - :paramtype network_fabric_id: str - :keyword address_family_type: AddressFamilyType. This parameter decides whether the given ipv4 - or ipv6 route policy. Known values are: "IPv4" and "IPv6". - :paramtype address_family_type: str or - ~azure.mgmt.managednetworkfabric.models.AddressFamilyType - """ - super().__init__(annotation=annotation, default_action=default_action, statements=statements, **kwargs) - self.default_action = default_action - self.statements = statements - self.network_fabric_id = network_fabric_id - self.address_family_type = address_family_type - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.annotation = annotation - - -class RoutePolicyStatementProperties(AnnotationResource): - """Route Policy Statement properties. - - All required parameters must be populated in order to send to server. - - :ivar annotation: Switch configuration description. - :vartype annotation: str - :ivar sequence_number: Sequence to insert to/delete from existing route. Required. - :vartype sequence_number: int - :ivar condition: Route policy condition properties. Required. - :vartype condition: ~azure.mgmt.managednetworkfabric.models.StatementConditionProperties - :ivar action: Route policy action properties. Required. - :vartype action: ~azure.mgmt.managednetworkfabric.models.StatementActionProperties - """ - - _validation = { - "sequence_number": {"required": True, "maximum": 4294967295, "minimum": 1}, - "condition": {"required": True}, - "action": {"required": True}, - } - - _attribute_map = { - "annotation": {"key": "annotation", "type": "str"}, - "sequence_number": {"key": "sequenceNumber", "type": "int"}, - "condition": {"key": "condition", "type": "StatementConditionProperties"}, - "action": {"key": "action", "type": "StatementActionProperties"}, - } - - def __init__( - self, - *, - sequence_number: int, - condition: "_models.StatementConditionProperties", - action: "_models.StatementActionProperties", - annotation: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword annotation: Switch configuration description. - :paramtype annotation: str - :keyword sequence_number: Sequence to insert to/delete from existing route. Required. - :paramtype sequence_number: int - :keyword condition: Route policy condition properties. Required. - :paramtype condition: ~azure.mgmt.managednetworkfabric.models.StatementConditionProperties - :keyword action: Route policy action properties. Required. - :paramtype action: ~azure.mgmt.managednetworkfabric.models.StatementActionProperties - """ - super().__init__(annotation=annotation, **kwargs) - self.sequence_number = sequence_number - self.condition = condition - self.action = action - - -class RouteTargetInformation(_serialization.Model): - """Route Target Configuration. - - :ivar import_ipv4_route_targets: Route Targets to be applied for incoming routes into CE. - :vartype import_ipv4_route_targets: list[str] - :ivar import_ipv6_route_targets: Route Targets to be applied for incoming routes from CE. - :vartype import_ipv6_route_targets: list[str] - :ivar export_ipv4_route_targets: Route Targets to be applied for outgoing routes into CE. - :vartype export_ipv4_route_targets: list[str] - :ivar export_ipv6_route_targets: Route Targets to be applied for outgoing routes from CE. - :vartype export_ipv6_route_targets: list[str] - """ - - _validation = { - "import_ipv4_route_targets": {"min_items": 1}, - "import_ipv6_route_targets": {"min_items": 1}, - "export_ipv4_route_targets": {"min_items": 1}, - "export_ipv6_route_targets": {"min_items": 1}, - } - - _attribute_map = { - "import_ipv4_route_targets": {"key": "importIpv4RouteTargets", "type": "[str]"}, - "import_ipv6_route_targets": {"key": "importIpv6RouteTargets", "type": "[str]"}, - "export_ipv4_route_targets": {"key": "exportIpv4RouteTargets", "type": "[str]"}, - "export_ipv6_route_targets": {"key": "exportIpv6RouteTargets", "type": "[str]"}, - } - - def __init__( - self, - *, - import_ipv4_route_targets: Optional[list[str]] = None, - import_ipv6_route_targets: Optional[list[str]] = None, - export_ipv4_route_targets: Optional[list[str]] = None, - export_ipv6_route_targets: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword import_ipv4_route_targets: Route Targets to be applied for incoming routes into CE. - :paramtype import_ipv4_route_targets: list[str] - :keyword import_ipv6_route_targets: Route Targets to be applied for incoming routes from CE. - :paramtype import_ipv6_route_targets: list[str] - :keyword export_ipv4_route_targets: Route Targets to be applied for outgoing routes into CE. - :paramtype export_ipv4_route_targets: list[str] - :keyword export_ipv6_route_targets: Route Targets to be applied for outgoing routes from CE. - :paramtype export_ipv6_route_targets: list[str] - """ - super().__init__(**kwargs) - self.import_ipv4_route_targets = import_ipv4_route_targets - self.import_ipv6_route_targets = import_ipv6_route_targets - self.export_ipv4_route_targets = export_ipv4_route_targets - self.export_ipv6_route_targets = export_ipv6_route_targets - - -class RuleProperties(_serialization.Model): - """Rules for the InternetGateways. - - All required parameters must be populated in order to send to server. - - :ivar action: Specify action. Required. Known values are: "Allow" and "Deny". - :vartype action: str or ~azure.mgmt.managednetworkfabric.models.Action - :ivar address_list: List of Addresses to be allowed or denied. Required. - :vartype address_list: list[str] - """ - - _validation = { - "action": {"required": True}, - "address_list": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "action": {"key": "action", "type": "str"}, - "address_list": {"key": "addressList", "type": "[str]"}, - } - - def __init__(self, *, action: Union[str, "_models.Action"], address_list: list[str], **kwargs: Any) -> None: - """ - :keyword action: Specify action. Required. Known values are: "Allow" and "Deny". - :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.Action - :keyword address_list: List of Addresses to be allowed or denied. Required. - :paramtype address_list: list[str] - """ - super().__init__(**kwargs) - self.action = action - self.address_list = address_list - - -class StatementActionProperties(_serialization.Model): - """Route policy action properties. - - All required parameters must be populated in order to send to server. - - :ivar local_preference: Local Preference of the route policy. - :vartype local_preference: int - :ivar action_type: Action type. Example: Permit | Deny | Continue. Required. Known values are: - "Permit", "Deny", and "Continue". - :vartype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType - :ivar ip_community_properties: IP Community Properties. - :vartype ip_community_properties: - ~azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties - :ivar ip_extended_community_properties: IP Extended Community Properties. - :vartype ip_extended_community_properties: - ~azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties - """ - - _validation = { - "local_preference": {"maximum": 4294967295, "minimum": 0}, - "action_type": {"required": True}, - } - - _attribute_map = { - "local_preference": {"key": "localPreference", "type": "int"}, - "action_type": {"key": "actionType", "type": "str"}, - "ip_community_properties": {"key": "ipCommunityProperties", "type": "ActionIpCommunityProperties"}, - "ip_extended_community_properties": { - "key": "ipExtendedCommunityProperties", - "type": "ActionIpExtendedCommunityProperties", - }, - } - - def __init__( - self, - *, - action_type: Union[str, "_models.RoutePolicyActionType"], - local_preference: Optional[int] = None, - ip_community_properties: Optional["_models.ActionIpCommunityProperties"] = None, - ip_extended_community_properties: Optional["_models.ActionIpExtendedCommunityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword local_preference: Local Preference of the route policy. - :paramtype local_preference: int - :keyword action_type: Action type. Example: Permit | Deny | Continue. Required. Known values - are: "Permit", "Deny", and "Continue". - :paramtype action_type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyActionType - :keyword ip_community_properties: IP Community Properties. - :paramtype ip_community_properties: - ~azure.mgmt.managednetworkfabric.models.ActionIpCommunityProperties - :keyword ip_extended_community_properties: IP Extended Community Properties. - :paramtype ip_extended_community_properties: - ~azure.mgmt.managednetworkfabric.models.ActionIpExtendedCommunityProperties - """ - super().__init__(**kwargs) - self.local_preference = local_preference - self.action_type = action_type - self.ip_community_properties = ip_community_properties - self.ip_extended_community_properties = ip_extended_community_properties - - -class StatementConditionProperties(IpCommunityIdList, IpExtendedCommunityIdList): - """Route policy statement condition properties. - - :ivar ip_extended_community_ids: List of IP Extended Community resource IDs. - :vartype ip_extended_community_ids: list[str] - :ivar ip_community_ids: List of IP Community resource IDs. - :vartype ip_community_ids: list[str] - :ivar type: Type of the condition used. Known values are: "Or" and "And". - :vartype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType - :ivar ip_prefix_id: Arm Resource Id of IpPrefix. - :vartype ip_prefix_id: str - """ - - _attribute_map = { - "ip_extended_community_ids": {"key": "ipExtendedCommunityIds", "type": "[str]"}, - "ip_community_ids": {"key": "ipCommunityIds", "type": "[str]"}, - "type": {"key": "type", "type": "str"}, - "ip_prefix_id": {"key": "ipPrefixId", "type": "str"}, - } - - def __init__( - self, - *, - ip_extended_community_ids: Optional[list[str]] = None, - ip_community_ids: Optional[list[str]] = None, - type: Union[str, "_models.RoutePolicyConditionType"] = "Or", - ip_prefix_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword ip_extended_community_ids: List of IP Extended Community resource IDs. - :paramtype ip_extended_community_ids: list[str] - :keyword ip_community_ids: List of IP Community resource IDs. - :paramtype ip_community_ids: list[str] - :keyword type: Type of the condition used. Known values are: "Or" and "And". - :paramtype type: str or ~azure.mgmt.managednetworkfabric.models.RoutePolicyConditionType - :keyword ip_prefix_id: Arm Resource Id of IpPrefix. - :paramtype ip_prefix_id: str - """ - super().__init__( - ip_community_ids=ip_community_ids, ip_extended_community_ids=ip_extended_community_ids, **kwargs - ) - self.ip_extended_community_ids = ip_extended_community_ids - self.type = type - self.ip_prefix_id = ip_prefix_id - self.ip_community_ids = ip_community_ids - - -class StaticRouteProperties(_serialization.Model): - """Route Properties. - - All required parameters must be populated in order to send to server. - - :ivar prefix: Prefix of the route. Required. - :vartype prefix: str - :ivar next_hop: List of next hop addresses. Required. - :vartype next_hop: list[str] - """ - - _validation = { - "prefix": {"required": True, "min_length": 1}, - "next_hop": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "prefix": {"key": "prefix", "type": "str"}, - "next_hop": {"key": "nextHop", "type": "[str]"}, - } - - def __init__(self, *, prefix: str, next_hop: list[str], **kwargs: Any) -> None: - """ - :keyword prefix: Prefix of the route. Required. - :paramtype prefix: str - :keyword next_hop: List of next hop addresses. Required. - :paramtype next_hop: list[str] - """ - super().__init__(**kwargs) - self.prefix = prefix - self.next_hop = next_hop - - -class SupportedConnectorProperties(_serialization.Model): - """Supported connector properties. - - :ivar connector_type: Type of connector used. Example: Optical. - :vartype connector_type: str - :ivar max_speed_in_mbps: Maximum speed of the connector in Mbps. - :vartype max_speed_in_mbps: int - """ - - _attribute_map = { - "connector_type": {"key": "connectorType", "type": "str"}, - "max_speed_in_mbps": {"key": "maxSpeedInMbps", "type": "int"}, - } - - def __init__( - self, *, connector_type: Optional[str] = None, max_speed_in_mbps: Optional[int] = None, **kwargs: Any - ) -> None: - """ - :keyword connector_type: Type of connector used. Example: Optical. - :paramtype connector_type: str - :keyword max_speed_in_mbps: Maximum speed of the connector in Mbps. - :paramtype max_speed_in_mbps: int - """ - super().__init__(**kwargs) - self.connector_type = connector_type - self.max_speed_in_mbps = max_speed_in_mbps - - -class SupportedVersionProperties(_serialization.Model): - """Supported version details of the network device. - - :ivar version: Operating system and firmware combined versions. - :vartype version: str - :ivar vendor_os_version: Operating system version. - :vartype vendor_os_version: str - :ivar vendor_firmware_version: Firmware version. - :vartype vendor_firmware_version: str - :ivar is_default: If true newly provisioned Fabric will use this device version by default to - bootstrap the network devices for the first time. Known values are: "True" and "False". - :vartype is_default: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - """ - - _attribute_map = { - "version": {"key": "version", "type": "str"}, - "vendor_os_version": {"key": "vendorOsVersion", "type": "str"}, - "vendor_firmware_version": {"key": "vendorFirmwareVersion", "type": "str"}, - "is_default": {"key": "isDefault", "type": "str"}, - } - - def __init__( - self, - *, - version: Optional[str] = None, - vendor_os_version: Optional[str] = None, - vendor_firmware_version: Optional[str] = None, - is_default: Optional[Union[str, "_models.BooleanEnumProperty"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword version: Operating system and firmware combined versions. - :paramtype version: str - :keyword vendor_os_version: Operating system version. - :paramtype vendor_os_version: str - :keyword vendor_firmware_version: Firmware version. - :paramtype vendor_firmware_version: str - :keyword is_default: If true newly provisioned Fabric will use this device version by default - to bootstrap the network devices for the first time. Known values are: "True" and "False". - :paramtype is_default: str or ~azure.mgmt.managednetworkfabric.models.BooleanEnumProperty - """ - super().__init__(**kwargs) - self.version = version - self.vendor_os_version = vendor_os_version - self.vendor_firmware_version = vendor_firmware_version - self.is_default = is_default - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.managednetworkfabric.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TerminalServerConfiguration(TerminalServerPatchableProperties, Layer3IpPrefixProperties): - """Network and credentials configuration currently applied to terminal server. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar username: Username for the terminal server connection. - :vartype username: str - :ivar password: Password for the terminal server connection. - :vartype password: str - :ivar serial_number: Serial Number of Terminal server. - :vartype serial_number: str - :ivar network_device_id: ARM Resource ID used for the NetworkDevice. - :vartype network_device_id: str - """ - - _validation = { - "username": {"min_length": 1}, - "password": {"min_length": 1}, - "serial_number": {"min_length": 1}, - "network_device_id": {"readonly": True}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "username": {"key": "username", "type": "str"}, - "password": {"key": "password", "type": "str"}, - "serial_number": {"key": "serialNumber", "type": "str"}, - "network_device_id": {"key": "networkDeviceId", "type": "str"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - username: Optional[str] = None, - password: Optional[str] = None, - serial_number: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword username: Username for the terminal server connection. - :paramtype username: str - :keyword password: Password for the terminal server connection. - :paramtype password: str - :keyword serial_number: Serial Number of Terminal server. - :paramtype serial_number: str - """ - super().__init__( - username=username, - password=password, - serial_number=serial_number, - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - **kwargs - ) - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - self.network_device_id: Optional[str] = None - self.username = username - self.password = password - self.serial_number = serial_number - - -class UpdateAdministrativeState(EnableDisableOnResources): - """Update administrative state on list of resources. - - :ivar resource_ids: Network Fabrics or Network Rack resource Id. - :vartype resource_ids: list[str] - :ivar state: Administrative state. Known values are: "Enable" and "Disable". - :vartype state: str or ~azure.mgmt.managednetworkfabric.models.EnableDisableState - """ - - _attribute_map = { - "resource_ids": {"key": "resourceIds", "type": "[str]"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__( - self, - *, - resource_ids: Optional[list[str]] = None, - state: Optional[Union[str, "_models.EnableDisableState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword resource_ids: Network Fabrics or Network Rack resource Id. - :paramtype resource_ids: list[str] - :keyword state: Administrative state. Known values are: "Enable" and "Disable". - :paramtype state: str or ~azure.mgmt.managednetworkfabric.models.EnableDisableState - """ - super().__init__(resource_ids=resource_ids, **kwargs) - self.state = state - - -class UpdateDeviceAdministrativeState(EnableDisableOnResources): - """Update the administrative state on list of resources. - - :ivar resource_ids: Network Fabrics or Network Rack resource Id. - :vartype resource_ids: list[str] - :ivar state: Administrative state. Known values are: "RMA", "Resync", "GracefulQuarantine", and - "Quarantine". - :vartype state: str or ~azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState - """ - - _attribute_map = { - "resource_ids": {"key": "resourceIds", "type": "[str]"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__( - self, - *, - resource_ids: Optional[list[str]] = None, - state: Optional[Union[str, "_models.DeviceAdministrativeState"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword resource_ids: Network Fabrics or Network Rack resource Id. - :paramtype resource_ids: list[str] - :keyword state: Administrative state. Known values are: "RMA", "Resync", "GracefulQuarantine", - and "Quarantine". - :paramtype state: str or ~azure.mgmt.managednetworkfabric.models.DeviceAdministrativeState - """ - super().__init__(resource_ids=resource_ids, **kwargs) - self.state = state - - -class UpdateVersion(_serialization.Model): - """Update version properties. - - :ivar version: Specify the version. - :vartype version: str - """ - - _attribute_map = { - "version": {"key": "version", "type": "str"}, - } - - def __init__(self, *, version: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword version: Specify the version. - :paramtype version: str - """ - super().__init__(**kwargs) - self.version = version - - -class UpgradeNetworkFabricProperties(UpdateVersion): - """UpgradeNetworkFabricProperties. - - :ivar version: Specify the version. - :vartype version: str - :ivar action: Action to be performed while upgrading the fabric. Known values are: "Start" and - "Complete". - :vartype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction - """ - - _attribute_map = { - "version": {"key": "version", "type": "str"}, - "action": {"key": "action", "type": "str"}, - } - - def __init__( - self, - *, - version: Optional[str] = None, - action: Optional[Union[str, "_models.NetworkFabricUpgradeAction"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword version: Specify the version. - :paramtype version: str - :keyword action: Action to be performed while upgrading the fabric. Known values are: "Start" - and "Complete". - :paramtype action: str or ~azure.mgmt.managednetworkfabric.models.NetworkFabricUpgradeAction - """ - super().__init__(version=version, **kwargs) - self.action = action - - -class ValidateConfigurationProperties(_serialization.Model): - """Validation configuration properties. - - :ivar validate_action: Validate action that to be performed. Known values are: "Cabling", - "Configuration", and "Connectivity". - :vartype validate_action: str or ~azure.mgmt.managednetworkfabric.models.ValidateAction - """ - - _attribute_map = { - "validate_action": {"key": "validateAction", "type": "str"}, - } - - def __init__( - self, *, validate_action: Optional[Union[str, "_models.ValidateAction"]] = None, **kwargs: Any - ) -> None: - """ - :keyword validate_action: Validate action that to be performed. Known values are: "Cabling", - "Configuration", and "Connectivity". - :paramtype validate_action: str or ~azure.mgmt.managednetworkfabric.models.ValidateAction - """ - super().__init__(**kwargs) - self.validate_action = validate_action - - -class ValidateConfigurationResponse(ErrorResponse): - """The response of the action validate configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: The error object. - :vartype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - :ivar configuration_state: Gets the configuration state. Known values are: "Succeeded", - "Failed", "Rejected", "Accepted", "Provisioned", "ErrorProvisioning", "Deprovisioning", - "Deprovisioned", "ErrorDeprovisioning", "DeferredControl", "Provisioning", and "PendingCommit". - :vartype configuration_state: str or ~azure.mgmt.managednetworkfabric.models.ConfigurationState - :ivar url: URL for the details of the response. - :vartype url: str - """ - - _validation = { - "configuration_state": {"readonly": True}, - } - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - "configuration_state": {"key": "configurationState", "type": "str"}, - "url": {"key": "url", "type": "str"}, - } - - def __init__( - self, *, error: Optional["_models.ErrorDetail"] = None, url: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.managednetworkfabric.models.ErrorDetail - :keyword url: URL for the details of the response. - :paramtype url: str - """ - super().__init__(error=error, **kwargs) - self.configuration_state: Optional[Union[str, "_models.ConfigurationState"]] = None - self.url = url - - -class VlanGroupProperties(_serialization.Model): - """Vlan group properties. - - :ivar name: Vlan group name. - :vartype name: str - :ivar vlans: List of vlans. - :vartype vlans: list[str] - """ - - _validation = { - "name": {"min_length": 1}, - "vlans": {"min_items": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "vlans": {"key": "vlans", "type": "[str]"}, - } - - def __init__(self, *, name: Optional[str] = None, vlans: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword name: Vlan group name. - :paramtype name: str - :keyword vlans: List of vlans. - :paramtype vlans: list[str] - """ - super().__init__(**kwargs) - self.name = name - self.vlans = vlans - - -class VlanMatchCondition(_serialization.Model): - """The vlan match conditions that need to be matched. - - :ivar vlans: List of vlans that need to be matched. - :vartype vlans: list[str] - :ivar inner_vlans: List of inner vlans that need to be matched. - :vartype inner_vlans: list[str] - :ivar vlan_group_names: List of vlan group names that need to be matched. - :vartype vlan_group_names: list[str] - """ - - _validation = { - "vlans": {"min_items": 1}, - "inner_vlans": {"min_items": 1}, - "vlan_group_names": {"min_items": 1}, - } - - _attribute_map = { - "vlans": {"key": "vlans", "type": "[str]"}, - "inner_vlans": {"key": "innerVlans", "type": "[str]"}, - "vlan_group_names": {"key": "vlanGroupNames", "type": "[str]"}, - } - - def __init__( - self, - *, - vlans: Optional[list[str]] = None, - inner_vlans: Optional[list[str]] = None, - vlan_group_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword vlans: List of vlans that need to be matched. - :paramtype vlans: list[str] - :keyword inner_vlans: List of inner vlans that need to be matched. - :paramtype inner_vlans: list[str] - :keyword vlan_group_names: List of vlan group names that need to be matched. - :paramtype vlan_group_names: list[str] - """ - super().__init__(**kwargs) - self.vlans = vlans - self.inner_vlans = inner_vlans - self.vlan_group_names = vlan_group_names - - -class VpnConfigurationPatchableProperties(_serialization.Model): - """Network and credential configuration currently applied on terminal server. - - :ivar network_to_network_interconnect_id: ARM Resource ID of the Network To Network - Interconnect. - :vartype network_to_network_interconnect_id: str - :ivar peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.OptionBProperties - :ivar option_a_properties: option A properties. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties - """ - - _attribute_map = { - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, - "peering_option": {"key": "peeringOption", "type": "str"}, - "option_b_properties": {"key": "optionBProperties", "type": "OptionBProperties"}, - "option_a_properties": { - "key": "optionAProperties", - "type": "VpnConfigurationPatchablePropertiesOptionAProperties", - }, - } - - def __init__( - self, - *, - network_to_network_interconnect_id: Optional[str] = None, - peering_option: Optional[Union[str, "_models.PeeringOption"]] = None, - option_b_properties: Optional["_models.OptionBProperties"] = None, - option_a_properties: Optional["_models.VpnConfigurationPatchablePropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword network_to_network_interconnect_id: ARM Resource ID of the Network To Network - Interconnect. - :paramtype network_to_network_interconnect_id: str - :keyword peering_option: Peering option list. Known values are: "OptionA" and "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.OptionBProperties - :keyword option_a_properties: option A properties. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties - """ - super().__init__(**kwargs) - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - - -class VpnConfigurationPatchablePropertiesOptionAProperties( - OptionAProperties, Layer3IpPrefixProperties -): # pylint: disable=name-too-long - """option A properties. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan Id.Example : 501. - :vartype vlan_id: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD Configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan Id.Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD Configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - super().__init__( - mtu=mtu, - vlan_id=vlan_id, - peer_asn=peer_asn, - bfd_configuration=bfd_configuration, - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - **kwargs - ) - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - self.mtu = mtu - self.vlan_id = vlan_id - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration - - -class VpnConfigurationProperties(_serialization.Model): - """Network and credential configuration currently applied on terminal server. - - 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 server. - - :ivar network_to_network_interconnect_id: ARM Resource ID of the Network To Network - Interconnect. - :vartype network_to_network_interconnect_id: str - :ivar administrative_state: Administrative state of the resource. Known values are: "Enabled", - "Disabled", "MAT", and "RMA". - :vartype administrative_state: str or - ~azure.mgmt.managednetworkfabric.models.AdministrativeState - :ivar peering_option: Peering option list. Required. Known values are: "OptionA" and "OptionB". - :vartype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :ivar option_b_properties: option B properties. - :vartype option_b_properties: ~azure.mgmt.managednetworkfabric.models.OptionBProperties - :ivar option_a_properties: option A properties. - :vartype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties - """ - - _validation = { - "administrative_state": {"readonly": True}, - "peering_option": {"required": True}, - } - - _attribute_map = { - "network_to_network_interconnect_id": {"key": "networkToNetworkInterconnectId", "type": "str"}, - "administrative_state": {"key": "administrativeState", "type": "str"}, - "peering_option": {"key": "peeringOption", "type": "str"}, - "option_b_properties": {"key": "optionBProperties", "type": "OptionBProperties"}, - "option_a_properties": {"key": "optionAProperties", "type": "VpnConfigurationPropertiesOptionAProperties"}, - } - - def __init__( - self, - *, - peering_option: Union[str, "_models.PeeringOption"], - network_to_network_interconnect_id: Optional[str] = None, - option_b_properties: Optional["_models.OptionBProperties"] = None, - option_a_properties: Optional["_models.VpnConfigurationPropertiesOptionAProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword network_to_network_interconnect_id: ARM Resource ID of the Network To Network - Interconnect. - :paramtype network_to_network_interconnect_id: str - :keyword peering_option: Peering option list. Required. Known values are: "OptionA" and - "OptionB". - :paramtype peering_option: str or ~azure.mgmt.managednetworkfabric.models.PeeringOption - :keyword option_b_properties: option B properties. - :paramtype option_b_properties: ~azure.mgmt.managednetworkfabric.models.OptionBProperties - :keyword option_a_properties: option A properties. - :paramtype option_a_properties: - ~azure.mgmt.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties - """ - super().__init__(**kwargs) - self.network_to_network_interconnect_id = network_to_network_interconnect_id - self.administrative_state: Optional[Union[str, "_models.AdministrativeState"]] = None - self.peering_option = peering_option - self.option_b_properties = option_b_properties - self.option_a_properties = option_a_properties - - -class VpnConfigurationPropertiesOptionAProperties( - OptionAProperties, Layer3IpPrefixProperties -): # pylint: disable=name-too-long - """option A properties. - - :ivar primary_ipv4_prefix: IPv4 Address Prefix. - :vartype primary_ipv4_prefix: str - :ivar primary_ipv6_prefix: IPv6 Address Prefix. - :vartype primary_ipv6_prefix: str - :ivar secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :vartype secondary_ipv4_prefix: str - :ivar secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :vartype secondary_ipv6_prefix: str - :ivar mtu: MTU to use for option A peering. - :vartype mtu: int - :ivar vlan_id: Vlan Id.Example : 501. - :vartype vlan_id: int - :ivar peer_asn: Peer ASN number.Example : 28. - :vartype peer_asn: int - :ivar bfd_configuration: BFD Configuration properties. - :vartype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - - _validation = { - "mtu": {"maximum": 9200, "minimum": 64}, - "vlan_id": {"maximum": 4094, "minimum": 501}, - "peer_asn": {"maximum": 4294967295, "minimum": 1}, - } - - _attribute_map = { - "primary_ipv4_prefix": {"key": "primaryIpv4Prefix", "type": "str"}, - "primary_ipv6_prefix": {"key": "primaryIpv6Prefix", "type": "str"}, - "secondary_ipv4_prefix": {"key": "secondaryIpv4Prefix", "type": "str"}, - "secondary_ipv6_prefix": {"key": "secondaryIpv6Prefix", "type": "str"}, - "mtu": {"key": "mtu", "type": "int"}, - "vlan_id": {"key": "vlanId", "type": "int"}, - "peer_asn": {"key": "peerASN", "type": "int"}, - "bfd_configuration": {"key": "bfdConfiguration", "type": "BfdConfiguration"}, - } - - def __init__( - self, - *, - primary_ipv4_prefix: Optional[str] = None, - primary_ipv6_prefix: Optional[str] = None, - secondary_ipv4_prefix: Optional[str] = None, - secondary_ipv6_prefix: Optional[str] = None, - mtu: int = 1500, - vlan_id: Optional[int] = None, - peer_asn: Optional[int] = None, - bfd_configuration: Optional["_models.BfdConfiguration"] = None, - **kwargs: Any - ) -> None: - """ - :keyword primary_ipv4_prefix: IPv4 Address Prefix. - :paramtype primary_ipv4_prefix: str - :keyword primary_ipv6_prefix: IPv6 Address Prefix. - :paramtype primary_ipv6_prefix: str - :keyword secondary_ipv4_prefix: Secondary IPv4 Address Prefix. - :paramtype secondary_ipv4_prefix: str - :keyword secondary_ipv6_prefix: Secondary IPv6 Address Prefix. - :paramtype secondary_ipv6_prefix: str - :keyword mtu: MTU to use for option A peering. - :paramtype mtu: int - :keyword vlan_id: Vlan Id.Example : 501. - :paramtype vlan_id: int - :keyword peer_asn: Peer ASN number.Example : 28. - :paramtype peer_asn: int - :keyword bfd_configuration: BFD Configuration properties. - :paramtype bfd_configuration: ~azure.mgmt.managednetworkfabric.models.BfdConfiguration - """ - super().__init__( - mtu=mtu, - vlan_id=vlan_id, - peer_asn=peer_asn, - bfd_configuration=bfd_configuration, - primary_ipv4_prefix=primary_ipv4_prefix, - primary_ipv6_prefix=primary_ipv6_prefix, - secondary_ipv4_prefix=secondary_ipv4_prefix, - secondary_ipv6_prefix=secondary_ipv6_prefix, - **kwargs - ) - self.primary_ipv4_prefix = primary_ipv4_prefix - self.primary_ipv6_prefix = primary_ipv6_prefix - self.secondary_ipv4_prefix = secondary_ipv4_prefix - self.secondary_ipv6_prefix = secondary_ipv6_prefix - self.mtu = mtu - self.vlan_id = vlan_id - self.peer_asn = peer_asn - self.bfd_configuration = bfd_configuration diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/models/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py index 4a911a89fb9a..6f98a0dd5ad0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,39 +12,43 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._access_control_lists_operations import AccessControlListsOperations # type: ignore -from ._internet_gateways_operations import InternetGatewaysOperations # type: ignore -from ._internet_gateway_rules_operations import InternetGatewayRulesOperations # type: ignore -from ._ip_communities_operations import IpCommunitiesOperations # type: ignore -from ._ip_extended_communities_operations import IpExtendedCommunitiesOperations # type: ignore -from ._ip_prefixes_operations import IpPrefixesOperations # type: ignore -from ._l2_isolation_domains_operations import L2IsolationDomainsOperations # type: ignore -from ._l3_isolation_domains_operations import L3IsolationDomainsOperations # type: ignore -from ._internal_networks_operations import InternalNetworksOperations # type: ignore -from ._external_networks_operations import ExternalNetworksOperations # type: ignore -from ._neighbor_groups_operations import NeighborGroupsOperations # type: ignore -from ._network_device_skus_operations import NetworkDeviceSkusOperations # type: ignore -from ._network_devices_operations import NetworkDevicesOperations # type: ignore -from ._network_interfaces_operations import NetworkInterfacesOperations # type: ignore -from ._network_fabric_controllers_operations import NetworkFabricControllersOperations # type: ignore -from ._network_fabric_skus_operations import NetworkFabricSkusOperations # type: ignore -from ._network_fabrics_operations import NetworkFabricsOperations # type: ignore -from ._network_to_network_interconnects_operations import NetworkToNetworkInterconnectsOperations # type: ignore -from ._network_packet_brokers_operations import NetworkPacketBrokersOperations # type: ignore -from ._network_racks_operations import NetworkRacksOperations # type: ignore -from ._network_tap_rules_operations import NetworkTapRulesOperations # type: ignore -from ._network_taps_operations import NetworkTapsOperations # type: ignore from ._operations import Operations # type: ignore -from ._route_policies_operations import RoutePoliciesOperations # type: ignore +from ._operations import AccessControlListsOperations # type: ignore +from ._operations import InternetGatewayRulesOperations # type: ignore +from ._operations import InternetGatewaysOperations # type: ignore +from ._operations import IpCommunitiesOperations # type: ignore +from ._operations import IpExtendedCommunitiesOperations # type: ignore +from ._operations import IpPrefixesOperations # type: ignore +from ._operations import L2IsolationDomainsOperations # type: ignore +from ._operations import L3IsolationDomainsOperations # type: ignore +from ._operations import InternalNetworksOperations # type: ignore +from ._operations import ExternalNetworksOperations # type: ignore +from ._operations import NeighborGroupsOperations # type: ignore +from ._operations import NetworkDeviceSkusOperations # type: ignore +from ._operations import NetworkDevicesOperations # type: ignore +from ._operations import NetworkInterfacesOperations # type: ignore +from ._operations import NetworkFabricControllersOperations # type: ignore +from ._operations import NetworkFabricSkusOperations # type: ignore +from ._operations import NetworkFabricsOperations # type: ignore +from ._operations import NetworkToNetworkInterconnectsOperations # type: ignore +from ._operations import NetworkPacketBrokersOperations # type: ignore +from ._operations import NetworkRacksOperations # type: ignore +from ._operations import NetworkTapRulesOperations # type: ignore +from ._operations import NetworkTapsOperations # type: ignore +from ._operations import RoutePoliciesOperations # type: ignore +from ._operations import NetworkMonitorsOperations # type: ignore +from ._operations import NetworkBootstrapDevicesOperations # type: ignore +from ._operations import NetworkBootstrapInterfacesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "Operations", "AccessControlListsOperations", - "InternetGatewaysOperations", "InternetGatewayRulesOperations", + "InternetGatewaysOperations", "IpCommunitiesOperations", "IpExtendedCommunitiesOperations", "IpPrefixesOperations", @@ -64,8 +68,10 @@ "NetworkRacksOperations", "NetworkTapRulesOperations", "NetworkTapsOperations", - "Operations", "RoutePoliciesOperations", + "NetworkMonitorsOperations", + "NetworkBootstrapDevicesOperations", + "NetworkBootstrapInterfacesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py deleted file mode 100644 index 51f481c1d495..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_access_control_lists_operations.py +++ /dev/null @@ -1,1581 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_resync_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class AccessControlListsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`access_control_lists` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlList, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "AccessControlList") - - _request = build_create_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.AccessControlList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlList, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Creates Access Control List. - - Implements Access Control List PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Is either a AccessControlList type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or IO[bytes] - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AccessControlList].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AccessControlList]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> _models.AccessControlList: - """Gets a Access Control List. - - Implements Access Control List GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: AccessControlList or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "AccessControlListPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.AccessControlListPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.AccessControlListPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AccessControlList]: - """Updates the Access Control List. - - API to update certain properties of the Access Control List resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Access Control List properties to update. Is either a AccessControlListPatch type - or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or IO[bytes] - :return: An instance of LROPoller that returns either AccessControlList or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AccessControlList", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AccessControlList].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AccessControlList]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Access Control List. - - Implements Access Control List DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: - """List AccessControlLists by resource group. - - Implements AccessControlLists list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either AccessControlList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: - """List AccessControlLists by subscription. - - Implements AccessControlLists list by subscription GET method. - - :return: An iterator like instance of either AccessControlList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AccessControlListsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AccessControlListsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - access_control_list_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _resync_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_resync( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync operation on the Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._resync_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_validate_configuration( - self, resource_group_name: str, access_control_list_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the Access Control Lists. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param access_control_list_name: Name of the Access Control List. Required. - :type access_control_list_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - access_control_list_name=access_control_list_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py deleted file mode 100644 index b347baf81231..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_external_networks_operations.py +++ /dev/null @@ -1,1494 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ExternalNetworksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`external_networks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetwork, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ExternalNetwork") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.ExternalNetwork, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetwork, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Creates ExternalNetwork for Layer3 Isolation Domain for communication of computes with external - services. - - Creates ExternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a ExternalNetwork type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or IO[bytes] - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ExternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ExternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> _models.ExternalNetwork: - """Retrieves details of ExternalNetwork. - - Implements ExternalNetworks GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :return: ExternalNetwork or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ExternalNetworkPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.ExternalNetworkPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.ExternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ExternalNetwork]: - """Updates a External Networks. - - API to update certain properties of the ExternalNetworks resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: ExternalNetwork properties to update. Only annotations are supported. Is either a - ExternalNetworkPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or IO[bytes] - :return: An instance of LROPoller that returns either ExternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ExternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ExternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a ExternalNetworks. - - Implements ExternalNetworks DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_l3_isolation_domain( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> ItemPaged["_models.ExternalNetwork"]: - """Executes list operation to display External Networks within an isolation domain. - - Implements External Networks list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An iterator like instance of either ExternalNetwork or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ExternalNetworksList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_l3_isolation_domain_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ExternalNetworksList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Executes update operation to enable or disable administrative State for externalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - external_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes Static Route BFD state update operation to the underlying resources. - - Update Static Route BFD for external Network. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param external_network_name: Name of the External Network. Required. - :type external_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - external_network_name=external_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py deleted file mode 100644 index aa5bb61b1530..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internal_networks_operations.py +++ /dev/null @@ -1,1758 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_bgp_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class InternalNetworksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`internal_networks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetwork, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternalNetwork") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.InternalNetwork, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetwork, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """Creates InternalNetwork for Layer3 Isolation Domain for communication of compute within and - across racks. - - Creates InternalNetwork PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a InternalNetwork type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or IO[bytes] - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> _models.InternalNetwork: - """Retrieves details of InternalNetworks using GET method. - - Gets a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :return: InternalNetwork or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternalNetworkPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.InternalNetworkPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.InternalNetworkPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternalNetwork]: - """API to update certain properties of the InternalNetworks resources. - - Updates a InternalNetworks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: InternalNetwork properties to update. Only annotations are supported. Is either a - InternalNetworkPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or IO[bytes] - :return: An instance of LROPoller that returns either InternalNetwork or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternalNetwork", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternalNetwork].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternalNetwork]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a InternalNetworks. - - Implements InternalNetworks DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_l3_isolation_domain( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> ItemPaged["_models.InternalNetwork"]: - """Executes list operation to display list of all internal networks. - - Displays InternalNetworks list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An iterator like instance of either InternalNetwork or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternalNetworksList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_l3_isolation_domain_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("InternalNetworksList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources. - - Update Administrative state of InternalNetworks on resources referred by their resource ids. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_bgp_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_bgp_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_bgp_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Executes the operation to the underlying resources for updating BGP state on edge devices. - - Update BGP state for internalNetwork. Allowed only on edge devices. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_bgp_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - l3_isolation_domain_name: str, - internal_network_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Update Static Route BFD administrative state for internalNetwork. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param internal_network_name: Name of the Internal Network. Required. - :type internal_network_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - internal_network_name=internal_network_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py deleted file mode 100644 index 807321274f7d..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateway_rules_operations.py +++ /dev/null @@ -1,1031 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class InternetGatewayRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`internet_gateway_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayRule") - - _request = build_create_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: _models.InternetGatewayRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRule, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Creates an Internet Gateway rule. - - Creates an Internet Gateway rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Request payload. Is either a InternetGatewayRule type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or IO[bytes] - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternetGatewayRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternetGatewayRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> _models.InternetGatewayRule: - """Gets an Internet Gateway Rule. - - Gets an Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :return: InternetGatewayRule or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayRulePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: _models.InternetGatewayRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - internet_gateway_rule_name: str, - body: Union[_models.InternetGatewayRulePatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternetGatewayRule]: - """Updates an Internet Gateway Rule. - - API to update certain properties of the Internet Gateway Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :param body: Internet Gateway Rule properties to update. Is either a InternetGatewayRulePatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or IO[bytes] - :return: An instance of LROPoller that returns either InternetGatewayRule or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGatewayRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternetGatewayRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternetGatewayRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes an Internet Gateway Rule. - - Implements Internet Gateway Rules DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. - :type internet_gateway_rule_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - internet_gateway_rule_name=internet_gateway_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.InternetGatewayRule"]: - """List Internet Gateway Rules by resource group. - - Implements Internet Gateway Rules list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGatewayRule"]: - """List Internet Gateway Rules by subscription. - - List all Internet Gateway rules in the given subscription. - - :return: An iterator like instance of either InternetGatewayRule or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewayRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewayRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py deleted file mode 100644 index 881b9533ce96..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_internet_gateways_operations.py +++ /dev/null @@ -1,1010 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class InternetGatewaysOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`internet_gateways` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGateway, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGateway") - - _request = build_create_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: _models.InternetGateway, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGateway, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Create a Network Fabric Service Internet Gateway. - - Creates a Network Fabric Service Internet Gateway resource instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: Request payload. Is either a InternetGateway type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or IO[bytes] - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternetGateway].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternetGateway]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: - """Retrieves details of Network Fabric Service Internet Gateway. - - Implements Gateway GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :return: InternetGateway or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "InternetGatewayPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: _models.InternetGatewayPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - internet_gateway_name: str, - body: Union[_models.InternetGatewayPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.InternetGateway]: - """Updates a Network Fabric Service Internet Gateway. - - Execute patch on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - InternetGatewayPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or IO[bytes] - :return: An instance of LROPoller that returns either InternetGateway or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("InternetGateway", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.InternetGateway].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.InternetGateway]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Fabric Service Internet Gateway. - - Execute a delete on Network Fabric Service Internet Gateway. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param internet_gateway_name: Name of the Internet Gateway. Required. - :type internet_gateway_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - internet_gateway_name=internet_gateway_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: - """List Internet Gateways by resource group. - - Displays Internet Gateways list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either InternetGateway or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: - """List Internet Gateways by subscription. - - Displays Internet Gateways list by subscription GET method. - - :return: An iterator like instance of either InternetGateway or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.InternetGatewaysListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("InternetGatewaysListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py deleted file mode 100644 index 240bf9a371fb..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_communities_operations.py +++ /dev/null @@ -1,1016 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class IpCommunitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_communities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunity, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpCommunity") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: _models.IpCommunity, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunity, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Create an IP Community. - - Implements an IP Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: Request payload. Is either a IpCommunity type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or IO[bytes] - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: - """Gets an IP Community. - - Implements an IP Community GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :return: IpCommunity or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpCommunityPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: _models.IpCommunityPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - ip_community_name: str, - body: Union[_models.IpCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IpCommunity]: - """Updates an IP Community. - - API to update certain properties of the IP Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :param body: IP Community properties to update. Is either a IpCommunityPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or IO[bytes] - :return: An instance of LROPoller that returns either IpCommunity or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes an IP Community. - - Implements IP Community DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_community_name: Name of the IP Community. Required. - :type ip_community_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - ip_community_name=ip_community_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: - """List IP Communities by resource group. - - Implements IP Communities list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpCommunity or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: - """List IP Communities by subscription. - - Implements IP Communities list by subscription GET method. - - :return: An iterator like instance of either IpCommunity or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpCommunitiesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpCommunitiesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py deleted file mode 100644 index 1875a09bd821..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_extended_communities_operations.py +++ /dev/null @@ -1,1031 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class IpExtendedCommunitiesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_extended_communities` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpExtendedCommunity") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: _models.IpExtendedCommunity, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunity, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Create an IP Extended Community. - - Implements IP Extended Community PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: Request payload. Is either a IpExtendedCommunity type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or IO[bytes] - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpExtendedCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpExtendedCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> _models.IpExtendedCommunity: - """Gets an IP Extended Community. - - Implements IP Extended Community GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :return: IpExtendedCommunity or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpExtendedCommunityPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: _models.IpExtendedCommunityPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - ip_extended_community_name: str, - body: Union[_models.IpExtendedCommunityPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IpExtendedCommunity]: - """Updates the IP Extended Community. - - API to update certain properties of the IP Extended Community resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :param body: IP Extended Community properties to update. Is either a IpExtendedCommunityPatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or IO[bytes] - :return: An instance of LROPoller that returns either IpExtendedCommunity or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunity", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpExtendedCommunity].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpExtendedCommunity]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the IP Extended Community. - - Implements IP Extended Community DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_extended_community_name: Name of the IP Extended Community. Required. - :type ip_extended_community_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - ip_extended_community_name=ip_extended_community_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.IpExtendedCommunity"]: - """List IpExtendedCommunities by resource group. - - Implements IpExtendedCommunities list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpExtendedCommunity"]: - """List IpExtendedCommunities by subscription. - - Implements IpExtendedCommunities list by subscription GET method. - - :return: An iterator like instance of either IpExtendedCommunity or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpExtendedCommunityListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpExtendedCommunityListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py deleted file mode 100644 index 18e2ecbde087..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_ip_prefixes_operations.py +++ /dev/null @@ -1,1002 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class IpPrefixesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`ip_prefixes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpPrefix") - - _request = build_create_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - ip_prefix_name: str, - body: _models.IpPrefix, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - ip_prefix_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, resource_group_name: str, ip_prefix_name: str, body: Union[_models.IpPrefix, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Create an IP Prefix. - - Implements IP Prefix PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: Request payload. Is either a IpPrefix type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or IO[bytes] - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpPrefix].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpPrefix]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: - """Gets an IP Prefix. - - Implements IP Prefix GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :return: IpPrefix or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - ip_prefix_name: str, - body: Union[_models.IpPrefixPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "IpPrefixPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: _models.IpPrefixPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - ip_prefix_name: str, - body: Union[_models.IpPrefixPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IpPrefix]: - """Updates the IP Prefix. - - API to update certain properties of the IP Prefix resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :param body: IP Prefix properties to update. Is either a IpPrefixPatch type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or IO[bytes] - :return: An instance of LROPoller that returns either IpPrefix or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IpPrefix", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IpPrefix].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IpPrefix]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the IP Prefix. - - Implements IP Prefix DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param ip_prefix_name: Name of the IP Prefix. Required. - :type ip_prefix_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - ip_prefix_name=ip_prefix_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: - """List IpPrefixes by resource group. - - Implements IpPrefixes list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either IpPrefix or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: - """List IpPrefixes by subscription. - - Implements IpPrefixes list by subscription GET method. - - :return: An iterator like instance of either IpPrefix or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IpPrefixesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IpPrefixesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py deleted file mode 100644 index 481777f2a5bf..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l2_isolation_domains_operations.py +++ /dev/null @@ -1,1572 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_commit_configuration_request( - resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class L2IsolationDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`l2_isolation_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L2IsolationDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.L2IsolationDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Create L2 Isolation Domain. - - Creates layer 2 network connectivity between compute nodes within a rack and across racks.The - configuration is applied on the devices only after the isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Is either a L2IsolationDomain type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or IO[bytes] - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.L2IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.L2IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> _models.L2IsolationDomain: - """Retrieves details of this L2 Isolation Domain. - - Implements L2 Isolation Domain GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: L2IsolationDomain or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L2IsolationDomainPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.L2IsolationDomainPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.L2IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.L2IsolationDomain]: - """Updates the L2 Isolation Domain. - - API to update certain properties of the L2 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: API to update certain properties of the L2 Isolation Domain resource.. Is either a - L2IsolationDomainPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or IO[bytes] - :return: An instance of LROPoller that returns either L2IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L2IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.L2IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.L2IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the L2 Isolation Domain. - - Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _update_administrative_state_initial( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - l2_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Enables isolation domain across the fabric or on specified racks. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_validate_configuration( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _commit_configuration_initial( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_commit_configuration( - self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. - :type l2_isolation_domain_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._commit_configuration_initial( - resource_group_name=resource_group_name, - l2_isolation_domain_name=l2_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: - """List L2IsolationDomains by resource group. - - Displays L2IsolationDomains list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: - """List L2IsolationDomains by subscription. - - Displays L2IsolationDomains list by subscription GET method. - - :return: An iterator like instance of either L2IsolationDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L2IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("L2IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py deleted file mode 100644 index d218e86fa92a..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_l3_isolation_domains_operations.py +++ /dev/null @@ -1,1575 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_commit_configuration_request( - resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class L3IsolationDomainsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`l3_isolation_domains` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L3IsolationDomain") - - _request = build_create_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.L3IsolationDomain, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomain, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Create L3 Isolation Domain. - - Create isolation domain resources for layer 3 connectivity between compute nodes and for - communication with external services .This configuration is applied on the devices only after - the creation of networks is completed and isolation domain is enabled. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Is either a L3IsolationDomain type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or IO[bytes] - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.L3IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.L3IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> _models.L3IsolationDomain: - """Gets a L3 Isolation Domain. - - Retrieves details of this L3 Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: L3IsolationDomain or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "L3IsolationDomainPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.L3IsolationDomainPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.L3IsolationDomainPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.L3IsolationDomain]: - """Updates a L3 Isolation Domain. - - API to update certain properties of the L3 Isolation Domain resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: API to update certain properties of the L3 Isolation Domain resource. Is either a - L3IsolationDomainPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or IO[bytes] - :return: An instance of LROPoller that returns either L3IsolationDomain or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("L3IsolationDomain", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.L3IsolationDomain].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.L3IsolationDomain]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a L3 Isolation Domain. - - Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: - """List L3IsolationDomains by resource group. - - Displays L3IsolationDomains list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: - """List L3IsolationDomains by subscription. - - Displays L3IsolationDomains list by subscription GET method. - - :return: An iterator like instance of either L3IsolationDomain or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.L3IsolationDomainsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("L3IsolationDomainsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - l3_isolation_domain_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """executes enable operation to the underlying resources. - - Enables racks for this Isolation Domain. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_validate_configuration( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _commit_configuration_initial( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_commit_configuration( - self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. - :type l3_isolation_domain_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._commit_configuration_initial( - resource_group_name=resource_group_name, - l3_isolation_domain_name=l3_isolation_domain_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py deleted file mode 100644 index 4d57a6239d7f..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_neighbor_groups_operations.py +++ /dev/null @@ -1,1004 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NeighborGroupsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`neighbor_groups` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroup, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NeighborGroup") - - _request = build_create_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: _models.NeighborGroup, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroup, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """Creates the Neighbor Group. - - Implements the Neighbor Group PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Request payload. Is either a NeighborGroup type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or IO[bytes] - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NeighborGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NeighborGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: - """Retrieves details of neighbor Group using GET method. - - Gets the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :return: NeighborGroup or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NeighborGroupPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: _models.NeighborGroupPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - neighbor_group_name: str, - body: Union[_models.NeighborGroupPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NeighborGroup]: - """API to update certain properties of the Neighbor Group Resources. - - Updates the Neighbor Group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :param body: Neighbor Group properties to update. Only annotations are supported. Is either a - NeighborGroupPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or IO[bytes] - :return: An instance of LROPoller that returns either NeighborGroup or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NeighborGroup", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NeighborGroup].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NeighborGroup]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Neighbor Group. - - Implements Neighbor Group DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param neighbor_group_name: Name of the Neighbor Group. Required. - :type neighbor_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - neighbor_group_name=neighbor_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: - """List Neighbor Groups by resource group. - - Displays NeighborGroups list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NeighborGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: - """List Neighbor Groups by subscription. - - Displays NeighborGroups list by subscription GET method. - - :return: An iterator like instance of either NeighborGroup or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NeighborGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NeighborGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py deleted file mode 100644 index f758036ad735..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_device_skus_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(network_device_sku_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "networkDeviceSkuName": _SERIALIZER.url("network_device_sku_name", network_device_sku_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkDeviceSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_device_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: - """Gets a Network Device Sku. - - Get a Network Device SKU details. - - :param network_device_sku_name: Name of the Network Device SKU. Required. - :type network_device_sku_name: str - :return: NetworkDeviceSku or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) - - _request = build_get_request( - network_device_sku_name=network_device_sku_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkDeviceSku", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDeviceSku"]: - """List Network Device SKUs by subscription. - - List Network Device SKUs for the given subscription. - - :return: An iterator like instance of either NetworkDeviceSku or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDeviceSkusListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDeviceSkusListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py deleted file mode 100644 index 84902de2bb51..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_devices_operations.py +++ /dev/null @@ -1,1900 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_reboot_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_configuration_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_upgrade_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkDevicesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_devices` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevice, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkDevice") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: _models.NetworkDevice, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevice, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Create Network Device. - - Create a Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a NetworkDevice type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or IO[bytes] - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: - """Gets a Network Device. - - Gets the Network Device resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: NetworkDevice or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkDevicePatchParameters") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: _models.NetworkDevicePatchParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.NetworkDevicePatchParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkDevice]: - """Updates a Network Device. - - Update certain properties of the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Network Device properties to update. Is either a NetworkDevicePatchParameters type - or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or IO[bytes] - :return: An instance of LROPoller that returns either NetworkDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Device. - - Delete the Network Device resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: - """List NetworkDevices by resource group. - - List all the Network Device resources in a given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkDevice or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: - """List NetworkDevices by subscription. - - List all the Network Device resources in a given subscription. - - :return: An iterator like instance of either NetworkDevice or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkDevicesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkDevicesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _reboot_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.RebootProperties, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RebootProperties") - - _request = build_reboot_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: _models.RebootProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_reboot( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.RebootProperties, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Reboot the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a RebootProperties type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._reboot_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _refresh_configuration_initial( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_configuration_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_configuration( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Refreshes the configuration the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_configuration_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateDeviceAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: _models.UpdateDeviceAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateDeviceAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Administrative state of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a UpdateDeviceAdministrativeState type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or - IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _upgrade_initial( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateVersion, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateVersion") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: _models.UpdateVersion, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_upgrade( - self, - resource_group_name: str, - network_device_name: str, - body: Union[_models.UpdateVersion, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the Network Device. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param body: Request payload. Is either a UpdateVersion type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._upgrade_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py deleted file mode 100644 index 7fe77d4d3012..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_controllers_operations.py +++ /dev/null @@ -1,1036 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricControllerName": _SERIALIZER.url( - "network_fabric_controller_name", network_fabric_controller_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricControllerName": _SERIALIZER.url( - "network_fabric_controller_name", network_fabric_controller_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricControllerName": _SERIALIZER.url( - "network_fabric_controller_name", network_fabric_controller_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricControllerName": _SERIALIZER.url( - "network_fabric_controller_name", network_fabric_controller_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkFabricControllersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabric_controllers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricController") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: _models.NetworkFabricController, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricController, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Create Network fabric controller. - - Creates a Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Request payload. Is either a NetworkFabricController type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or IO[bytes] - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkFabricController].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkFabricController]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> _models.NetworkFabricController: - """Gets a Network Fabric Controller. - - Shows the provisioning status of Network Fabric Controller. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :return: NetworkFabricController or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricControllerPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: _models.NetworkFabricControllerPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_fabric_controller_name: str, - body: Union[_models.NetworkFabricControllerPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkFabricController]: - """Updates a Network Fabric Controller. - - Updates are currently not supported for the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :param body: Network Fabric Controller properties to update. Is either a - NetworkFabricControllerPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabricController", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkFabricController].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkFabricController]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a Network Fabric Controller. - - Deletes the Network Fabric Controller resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. - :type network_fabric_controller_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_controller_name=network_fabric_controller_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.NetworkFabricController"]: - """List NetworkFabricControllers by resource group. - - Lists all the NetworkFabricControllers thats available in the resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricController"]: - """List NetworkFabricControllers by subscription. - - Lists all the NetworkFabricControllers by subscription. - - :return: An iterator like instance of either NetworkFabricController or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricControllersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricControllersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py deleted file mode 100644 index 7b431a079080..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabric_skus_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(network_fabric_sku_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "networkFabricSkuName": _SERIALIZER.url("network_fabric_sku_name", network_fabric_sku_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkFabricSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabric_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: - """Gets a Network Fabric Sku. - - Implements Network Fabric SKU GET method. - - :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. - :type network_fabric_sku_name: str - :return: NetworkFabricSku or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) - - _request = build_get_request( - network_fabric_sku_name=network_fabric_sku_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabricSku", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricSku"]: - """List Network Fabric SKUs by subscription. - - Implements Network Fabric SKUs list by subscription GET method. - - :return: An iterator like instance of either NetworkFabricSku or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricSkusListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricSkusListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py deleted file mode 100644 index fcebfaa2a6b6..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_fabrics_operations.py +++ /dev/null @@ -1,2788 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_provision_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_deprovision_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_upgrade_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_configuration_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_workload_management_bfd_configuration_request( # pylint: disable=name-too-long - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_infra_management_bfd_configuration_request( # pylint: disable=name-too-long - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_topology_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_commit_configuration_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkFabricsOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_fabrics` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabric, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabric") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.NetworkFabric, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabric, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Create Network Fabric. - - Create Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a NetworkFabric type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or IO[bytes] - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkFabric].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkFabric]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: - """Gets a Network Fabric. - - Get Network Fabric resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: NetworkFabric or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkFabricPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.NetworkFabricPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.NetworkFabricPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkFabric]: - """Updates a Network Fabric. - - Update certain properties of the Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a NetworkFabricPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkFabric or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkFabric", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkFabric].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkFabric]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Fabric. - - Delete Network Fabric resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: - """List Network Fabrics by resource group. - - List all the Network Fabric resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkFabric or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: - """List Network Fabrics by subscription. - - List all the Network Fabric resources in the given subscription. - - :return: An iterator like instance of either NetworkFabric or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkFabricsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkFabricsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _provision_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_provision_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_provision( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Provisions the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._provision_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _deprovision_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_deprovision_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_deprovision( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Implements the operation to the underlying resources. - - Deprovisions the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._deprovision_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _upgrade_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpgradeNetworkFabricProperties") - - _request = build_upgrade_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpgradeNetworkFabricProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_upgrade( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpgradeNetworkFabricProperties, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Upgrades the version of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Network Fabric properties to update. Is either a UpgradeNetworkFabricProperties - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._upgrade_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _refresh_configuration_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh_configuration( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Refreshes the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_workload_management_bfd_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Workload Management BFD Configuration of the underlying resources in the given - Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_workload_management_bfd_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_infra_management_bfd_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Infra Management BFD Configuration of the underlying resources in the given Network - Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_infra_management_bfd_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "ValidateConfigurationProperties") - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: _models.ValidateConfigurationProperties, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_validate_configuration( - self, - resource_group_name: str, - network_fabric_name: str, - body: Union[_models.ValidateConfigurationProperties, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Validates the configuration of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param body: Validate configuration properties. Is either a ValidateConfigurationProperties - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or - IO[bytes] - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _get_topology_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_get_topology_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_get_topology( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Implements the operation to the underlying resources. - - Gets Topology of the underlying resources in the given Network Fabric instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._get_topology_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _commit_configuration_initial( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_commit_configuration( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric - level. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._commit_configuration_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py deleted file mode 100644 index 69ccbdae028d..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_interfaces_operations.py +++ /dev/null @@ -1,1207 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_network_device_request( - resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), - "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkInterfacesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_interfaces` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterface, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkInterface") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.NetworkInterface, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterface, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Create NetworkInterface. - - Create a Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Is either a NetworkInterface type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or IO[bytes] - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkInterface].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkInterface]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> _models.NetworkInterface: - """Gets a NetworkInterface. - - Get the Network Interface resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :return: NetworkInterface or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkInterfacePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.NetworkInterfacePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.NetworkInterfacePatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkInterface]: - """Updates a NetworkInterface. - - Update certain properties of the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: NetworkInterface properties to update. Only tags are supported. Is either a - NetworkInterfacePatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkInterface or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkInterface", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkInterface].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkInterface]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a NetworkInterface. - - Delete the Network Interface resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_network_device( - self, resource_group_name: str, network_device_name: str, **kwargs: Any - ) -> ItemPaged["_models.NetworkInterface"]: - """List all Network Interfaces that are available using an Network Device. - - List all the Network Interface resources in a given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :return: An iterator like instance of either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkInterfacesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_network_device_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkInterfacesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - network_device_name: str, - network_interface_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates the admin state of the network interface. - - Update the admin state of the Network Interface. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_device_name: Name of the Network Device. Required. - :type network_device_name: str - :param network_interface_name: Name of the Network Interface. Required. - :type network_interface_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_device_name=network_device_name, - network_interface_name=network_interface_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py deleted file mode 100644 index ecf547d67a64..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_packet_brokers_operations.py +++ /dev/null @@ -1,1019 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkPacketBrokersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_packet_brokers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkPacketBroker") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: _models.NetworkPacketBroker, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBroker, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Create Network Packet Broker. - - Creates a Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Request payload. Is either a NetworkPacketBroker type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or IO[bytes] - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkPacketBroker].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkPacketBroker]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> _models.NetworkPacketBroker: - """Gets a Network Packet Broker. - - Retrieves details of this Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :return: NetworkPacketBroker or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkPacketBrokerPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: _models.NetworkPacketBrokerPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_packet_broker_name: str, - body: Union[_models.NetworkPacketBrokerPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkPacketBroker]: - """Updates the Network Packet Broker. - - API to update certain properties of the Network Packet Broker resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :param body: Network Packet Broker properties to update. Is either a NetworkPacketBrokerPatch - type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkPacketBroker or the result of - cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkPacketBroker", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkPacketBroker].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkPacketBroker]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Packet Broker. - - Deletes Network Packet Broker. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_packet_broker_name: Name of the Network Packet Broker. Required. - :type network_packet_broker_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_packet_broker_name=network_packet_broker_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.NetworkPacketBroker"]: - """List all Network Packet Brokers under resource group. - - Displays NetworkPacketBrokers list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkPacketBroker"]: - """List Network Packet Brokers by subscription. - - Displays Network Packet Brokers list by subscription GET method. - - :return: An iterator like instance of either NetworkPacketBroker or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkPacketBrokersListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkPacketBrokersListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py deleted file mode 100644 index 8dc823cff354..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_racks_operations.py +++ /dev/null @@ -1,1004 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkRacksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_racks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.NetworkRack, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkRack") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: _models.NetworkRack, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.NetworkRack, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Create Network Rack. - - Create Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Request payload. Is either a NetworkRack type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or IO[bytes] - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkRack].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkRack]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: - """Gets a Network Rack. - - Get Network Rack resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :return: NetworkRack or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.TagsUpdate, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "TagsUpdate") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: _models.TagsUpdate, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_rack_name: str, - body: Union[_models.TagsUpdate, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkRack]: - """Updates a Network Rack. - - Update certain properties of the Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :param body: Network Rack properties to update. Is either a TagsUpdate type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.TagsUpdate or IO[bytes] - :return: An instance of LROPoller that returns either NetworkRack or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkRack", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkRack].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkRack]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Rack. - - Delete Network Rack resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_rack_name: Name of the Network Rack. Required. - :type network_rack_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_rack_name=network_rack_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: - """List Network Racks by resource group. - - List all Network Rack resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkRack or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: - """List Network Racks by subscription. - - List all Network Rack resources in the given subscription. - - :return: An iterator like instance of either NetworkRack or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkRacksListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkRacksListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py deleted file mode 100644 index 5bb2cb923d78..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_tap_rules_operations.py +++ /dev/null @@ -1,1571 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_resync_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkTapRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_tap_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapRule") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.NetworkTapRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRule, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Create Network Tap Rule. - - Create Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Is either a NetworkTapRule type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or IO[bytes] - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkTapRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkTapRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: - """Gets a Network Tap Rule. - - Get Network Tap Rule resource details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: NetworkTapRule or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapRulePatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.NetworkTapRulePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.NetworkTapRulePatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkTapRule]: - """Updates a Network Tap Rule. - - Update certain properties of the Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Network Tap Rule properties to update. Is either a NetworkTapRulePatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkTapRule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTapRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkTapRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkTapRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Tap Rule. - - Delete Network Tap Rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: - """List Network Tap Rules by resource group. - - List all the Network Tap Rule resources in the given resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkTapRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: - """List NetworkTapRules by subscription. - - List all the Network Tap Rule resources in the given subscription. - - :return: An iterator like instance of either NetworkTapRule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapRulesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_rule_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Updates administrative state of Network Tap Rules. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _resync_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_resync( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync the Network Tap Rule. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._resync_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_validate_configuration( - self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the Network Tap Rule. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_rule_name: Name of the Network Tap Rule. Required. - :type network_tap_rule_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - network_tap_rule_name=network_tap_rule_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py deleted file mode 100644 index 75b3ee0ee8c2..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_taps_operations.py +++ /dev/null @@ -1,1391 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_resync_request( - resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkTapsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_taps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTap") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.NetworkTap, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, resource_group_name: str, network_tap_name: str, body: Union[_models.NetworkTap, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Create Network Tap. - - Creates a Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Is either a NetworkTap type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or IO[bytes] - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkTap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkTap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: - """Gets a Network Tap. - - Retrieves details of this Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: NetworkTap or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.NetworkTapPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkTapPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.NetworkTapPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.NetworkTapPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkTap]: - """Updates the Network Taps. - - API to update certain properties of the Network Tap resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Network Tap properties to update. Is either a NetworkTapPatch type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or IO[bytes] - :return: An instance of LROPoller that returns either NetworkTap or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkTap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkTap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkTap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Network Tap. - - Deletes Network Tap. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: - """List Network Taps by resource group. - - Displays Network Taps list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either NetworkTap or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: - """List Network Taps by subscription. - - Displays Network Taps list by subscription GET method. - - :return: An iterator like instance of either NetworkTap or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkTapsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkTapsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - network_tap_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Updates administrative state of Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _resync_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_resync_request( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_resync( - self, resource_group_name: str, network_tap_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Resync operation on the Network Tap. - - Implements the operation to the underlying resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_tap_name: Name of the Network Tap. Required. - :type network_tap_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._resync_initial( - resource_group_name=resource_group_name, - network_tap_name=network_tap_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py deleted file mode 100644 index dd4cee6f357d..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_network_to_network_interconnects_operations.py +++ /dev/null @@ -1,1539 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_network_fabric_request( - resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_npb_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), - "networkToNetworkInterconnectName": _SERIALIZER.url( - "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class NetworkToNetworkInterconnectsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`network_to_network_interconnects` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkToNetworkInterconnect") - - _request = build_create_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.NetworkToNetworkInterconnect, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnect, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Configuration used to setup CE-PE connectivity. - - Configuration used to setup CE-PE connectivity PUT Method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a NetworkToNetworkInterconnect type or a IO[bytes] - type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or IO[bytes] - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkToNetworkInterconnect]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> _models.NetworkToNetworkInterconnect: - """Configuration used to setup CE-PE connectivity. - - Implements NetworkToNetworkInterconnects GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :return: NetworkToNetworkInterconnect or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "NetworkToNetworkInterconnectPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.NetworkToNetworkInterconnectPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.NetworkToNetworkInterconnectPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.NetworkToNetworkInterconnect]: - """Updates a Network To NetworkInterconnects. - - Update certain properties of the Network To NetworkInterconnects resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Network to Network Interconnect properties to update. Is either a - NetworkToNetworkInterconnectPatch type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or - IO[bytes] - :return: An instance of LROPoller that returns either NetworkToNetworkInterconnect or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnect", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.NetworkToNetworkInterconnect]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes a NetworkToNetworkInterconnects. - - Implements NetworkToNetworkInterconnects DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_network_fabric( - self, resource_group_name: str, network_fabric_name: str, **kwargs: Any - ) -> ItemPaged["_models.NetworkToNetworkInterconnect"]: - """Executes list operation to display Network To Network Interconnects within a Network Fabric. - - Implements Network To Network Interconnects list by Network Fabric GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :return: An iterator like instance of either NetworkToNetworkInterconnect or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkToNetworkInterconnectsList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_network_fabric_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NetworkToNetworkInterconnectsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_npb_static_route_bfd_administrative_state_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the NPB Static Route BFD Administrative State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_npb_static_route_bfd_administrative_state_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - network_fabric_name: str, - network_to_network_interconnect_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Implements the operation to the underlying resources. - - Updates the Admin State. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param network_fabric_name: Name of the Network Fabric. Required. - :type network_fabric_name: str - :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. - Required. - :type network_to_network_interconnect_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - network_fabric_name=network_fabric_name, - network_to_network_interconnect_name=network_to_network_interconnect_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py index e9ec188ea1a0..e333f8696354 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_operations.py @@ -1,12 +1,15 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -16,36 +19,43 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models from .._configuration import ManagedNetworkFabricMgmtClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer +from .._validation import api_version_validation T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.ManagedNetworkFabric/operations") + _url = "/providers/Microsoft.ManagedNetworkFabric/operations" # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -56,6 +66,5987 @@ def build_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_access_control_lists_get_request( + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_create_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_update_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_delete_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_access_control_lists_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_resync_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_access_control_lists_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, access_control_list_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "accessControlListName": _SERIALIZER.url("access_control_list_name", access_control_list_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateway_rules_get_request( + resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateway_rules_create_request( # pylint: disable=name-too-long + resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateway_rules_update_request( # pylint: disable=name-too-long + resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateway_rules_delete_request( # pylint: disable=name-too-long + resource_group_name: str, internet_gateway_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayRuleName": _SERIALIZER.url("internet_gateway_rule_name", internet_gateway_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_internet_gateway_rules_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateway_rules_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateways_get_request( + resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateways_create_request( + resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateways_update_request( + resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateways_delete_request( + resource_group_name: str, internet_gateway_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "internetGatewayName": _SERIALIZER.url("internet_gateway_name", internet_gateway_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_internet_gateways_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internet_gateways_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_communities_get_request( + resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_communities_create_request( + resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_communities_update_request( + resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_communities_delete_request( + resource_group_name: str, ip_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipCommunityName": _SERIALIZER.url("ip_community_name", ip_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_ip_communities_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_communities_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipCommunities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_extended_communities_get_request( # pylint: disable=name-too-long + resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_extended_communities_create_request( # pylint: disable=name-too-long + resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_extended_communities_update_request( # pylint: disable=name-too-long + resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_extended_communities_delete_request( # pylint: disable=name-too-long + resource_group_name: str, ip_extended_community_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipExtendedCommunityName": _SERIALIZER.url("ip_extended_community_name", ip_extended_community_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_ip_extended_communities_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_extended_communities_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_prefixes_get_request( + resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_prefixes_create_request( + resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_prefixes_update_request( + resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_prefixes_delete_request( + resource_group_name: str, ip_prefix_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "ipPrefixName": _SERIALIZER.url("ip_prefix_name", ip_prefix_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_ip_prefixes_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_ip_prefixes_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_get_request( + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_create_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_update_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_delete_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_l2_isolation_domains_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l2_isolation_domains_commit_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, l2_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l2IsolationDomainName": _SERIALIZER.url("l2_isolation_domain_name", l2_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_get_request( + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_create_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_update_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_delete_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_l3_isolation_domains_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_l3_isolation_domains_commit_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_get_request( + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_create_request( + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_update_request( + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_delete_request( + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_internal_networks_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_update_bgp_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_internal_networks_update_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "internalNetworkName": _SERIALIZER.url("internal_network_name", internal_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_get_request( + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_create_request( + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_update_request( + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_delete_request( + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_external_networks_list_by_l3_isolation_domain_request( # pylint: disable=name-too-long + resource_group_name: str, l3_isolation_domain_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_update_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_external_networks_update_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "l3IsolationDomainName": _SERIALIZER.url("l3_isolation_domain_name", l3_isolation_domain_name, "str"), + "externalNetworkName": _SERIALIZER.url("external_network_name", external_network_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_get_request( + resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_create_request( + resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_update_request( + resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_delete_request( + resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_neighbor_groups_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_neighbor_groups_resync_request( + resource_group_name: str, neighbor_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}/resync" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "neighborGroupName": _SERIALIZER.url("neighbor_group_name", neighbor_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_device_skus_get_request( + network_device_sku_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus/{networkDeviceSkuName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "networkDeviceSkuName": _SERIALIZER.url("network_device_sku_name", network_device_sku_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_device_skus_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDeviceSkus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_get_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_create_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_update_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_delete_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_devices_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_reboot_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_refresh_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_upgrade_request( + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_run_ro_command_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRoCommand" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_run_rw_command_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/runRwCommand" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_resync_passwords_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncPasswords" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_devices_resync_certificates_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/resyncCertificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_interfaces_get_request( + resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_interfaces_create_request( + resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_interfaces_update_request( + resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_interfaces_delete_request( + resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_interfaces_list_by_network_device_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_interfaces_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_device_name: str, network_interface_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkDeviceName": _SERIALIZER.url("network_device_name", network_device_name, "str"), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_controllers_get_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricControllerName": _SERIALIZER.url( + "network_fabric_controller_name", network_fabric_controller_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_controllers_create_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricControllerName": _SERIALIZER.url( + "network_fabric_controller_name", network_fabric_controller_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_controllers_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricControllerName": _SERIALIZER.url( + "network_fabric_controller_name", network_fabric_controller_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_controllers_delete_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_controller_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricControllerName": _SERIALIZER.url( + "network_fabric_controller_name", network_fabric_controller_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_fabric_controllers_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_controllers_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_skus_get_request( + network_fabric_sku_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus/{networkFabricSkuName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "networkFabricSkuName": _SERIALIZER.url("network_fabric_sku_name", network_fabric_sku_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabric_skus_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabricSkus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_get_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_create_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_update_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_delete_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_fabrics_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkFabrics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_provision_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_deprovision_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_upgrade_request( + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_refresh_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_update_workload_management_bfd_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_update_infra_management_bfd_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_get_topology_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_commit_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_commit_batch_status_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitBatchStatus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_discard_commit_batch_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/discardCommitBatch" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_lock_fabric_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/lockFabric" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_view_device_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/viewDeviceConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_arm_configuration_diff_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/armConfigurationDiff" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_rotate_passwords_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotatePasswords" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_resync_passwords_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncPasswords" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_rotate_certificates_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/rotateCertificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_fabrics_resync_certificates_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/resyncCertificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_get_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_create_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_update_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_to_network_interconnects_list_by_network_fabric_request( # pylint: disable=name-too-long + resource_group_name: str, network_fabric_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_to_network_interconnects_update_bfd_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateBfdAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkFabricName": _SERIALIZER.url("network_fabric_name", network_fabric_name, "str"), + "networkToNetworkInterconnectName": _SERIALIZER.url( + "network_to_network_interconnect_name", network_to_network_interconnect_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_packet_brokers_get_request( + resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_packet_brokers_create_request( # pylint: disable=name-too-long + resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_packet_brokers_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_packet_brokers_delete_request( # pylint: disable=name-too-long + resource_group_name: str, network_packet_broker_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkPacketBrokerName": _SERIALIZER.url("network_packet_broker_name", network_packet_broker_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_packet_brokers_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_packet_brokers_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_racks_get_request( + resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_racks_create_request( + resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_racks_update_request( + resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_racks_delete_request( + resource_group_name: str, network_rack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks/{networkRackName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkRackName": _SERIALIZER.url("network_rack_name", network_rack_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_racks_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkRacks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_racks_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRacks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_get_request( + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_create_request( + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_update_request( + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_delete_request( + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_tap_rules_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_resync_request( + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_tap_rules_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_tap_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapRuleName": _SERIALIZER.url("network_tap_rule_name", network_tap_rule_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_get_request( + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_create_request( + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_update_request( + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_delete_request( + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_taps_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_taps_resync_request( + resource_group_name: str, network_tap_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkTapName": _SERIALIZER.url("network_tap_name", network_tap_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_get_request( + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_create_request( + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_update_request( + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_delete_request( + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_route_policies_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_validate_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_route_policies_commit_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_get_request( + resource_group_name: str, network_monitor_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkMonitorName": _SERIALIZER.url("network_monitor_name", network_monitor_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_create_request( + resource_group_name: str, network_monitor_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkMonitorName": _SERIALIZER.url("network_monitor_name", network_monitor_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_update_request( + resource_group_name: str, network_monitor_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkMonitorName": _SERIALIZER.url("network_monitor_name", network_monitor_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_delete_request( + resource_group_name: str, network_monitor_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkMonitorName": _SERIALIZER.url("network_monitor_name", network_monitor_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_monitors_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkMonitors" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_monitors_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_monitor_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkMonitors/{networkMonitorName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkMonitorName": _SERIALIZER.url("network_monitor_name", network_monitor_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_get_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_create_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_update_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_delete_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_bootstrap_devices_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_reboot_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/reboot" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_refresh_configuration_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/refreshConfiguration" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_upgrade_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/upgrade" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_devices_resync_passwords_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/resyncPasswords" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_interfaces_get_request( # pylint: disable=name-too-long + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + "networkBootstrapInterfaceName": _SERIALIZER.url( + "network_bootstrap_interface_name", network_bootstrap_interface_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_interfaces_create_request( # pylint: disable=name-too-long + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + "networkBootstrapInterfaceName": _SERIALIZER.url( + "network_bootstrap_interface_name", network_bootstrap_interface_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_interfaces_update_request( # pylint: disable=name-too-long + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + "networkBootstrapInterfaceName": _SERIALIZER.url( + "network_bootstrap_interface_name", network_bootstrap_interface_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_interfaces_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + "networkBootstrapInterfaceName": _SERIALIZER.url( + "network_bootstrap_interface_name", network_bootstrap_interface_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_network_bootstrap_interfaces_list_by_network_bootstrap_device_request( # pylint: disable=name-too-long + resource_group_name: str, network_bootstrap_device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_network_bootstrap_interfaces_update_administrative_state_request( # pylint: disable=name-too-long + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-07-15")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/{networkBootstrapDeviceName}/networkBootstrapInterfaces/{networkBootstrapInterfaceName}/updateAdministrativeState" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "networkBootstrapDeviceName": _SERIALIZER.url( + "network_bootstrap_device_name", network_bootstrap_device_name, "str" + ), + "networkBootstrapInterfaceName": _SERIALIZER.url( + "network_bootstrap_interface_name", network_bootstrap_interface_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + class Operations: """ .. warning:: @@ -63,11 +6054,33457 @@ class Operations: Instead, you should access the following operations through :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`operations` attribute. + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AccessControlListsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`access_control_lists` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> _models.AccessControlList: + """Implements Access Control List GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: AccessControlList. The AccessControlList is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.AccessControlList + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + + _request = build_access_control_lists_get_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AccessControlList, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlList, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_create_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.AccessControlList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlList, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """Implements Access Control List PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Is one of the following types: AccessControlList, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlList or JSON or IO[bytes] + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AccessControlList, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AccessControlList].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlListPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_update_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.AccessControlListPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.AccessControlListPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AccessControlList]: + """API to update certain properties of the Access Control List resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Access Control List properties to update. Is one of the following types: + AccessControlListPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.AccessControlListPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns AccessControlList. The AccessControlList is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AccessControlList] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AccessControlList, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AccessControlList].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AccessControlList]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_delete_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, access_control_list_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements Access Control List DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: + """Implements AccessControlLists list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of AccessControlList + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessControlList]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_access_control_lists_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessControlList], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.AccessControlList"]: + """Implements AccessControlLists list by subscription GET method. + + :return: An iterator like instance of AccessControlList + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.AccessControlList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AccessControlList]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_access_control_lists_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AccessControlList], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "access_control_list_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_access_control_lists_update_administrative_state_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "access_control_list_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + access_control_list_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _resync_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_resync_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_resync( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_access_control_lists_validate_configuration_request( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_validate_configuration( + self, resource_group_name: str, access_control_list_name: str, **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param access_control_list_name: Name of the Access Control List. Required. + :type access_control_list_name: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + access_control_list_name=access_control_list_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class InternetGatewayRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`internet_gateway_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any + ) -> _models.InternetGatewayRule: + """Gets an Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :return: InternetGatewayRule. The InternetGatewayRule is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + + _request = build_internet_gateway_rules_get_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRule, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateway_rules_create_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: _models.InternetGatewayRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRule, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """Creates an Internet Gateway rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Request payload. Is one of the following types: InternetGatewayRule, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRule or JSON or IO[bytes] + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternetGatewayRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateway_rules_update_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: _models.InternetGatewayRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + internet_gateway_rule_name: str, + body: Union[_models.InternetGatewayRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternetGatewayRule]: + """API to update certain properties of the Internet Gateway Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :param body: Internet Gateway Rule properties to update. Is one of the following types: + InternetGatewayRulePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayRulePatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns InternetGatewayRule. The InternetGatewayRule is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGatewayRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGatewayRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternetGatewayRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternetGatewayRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internet_gateway_rules_delete_request( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, internet_gateway_rule_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements Internet Gateway Rules DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_rule_name: Name of the Internet Gateway rule. Required. + :type internet_gateway_rule_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + internet_gateway_rule_name=internet_gateway_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.InternetGatewayRule"]: + """Implements Internet Gateway Rules list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of InternetGatewayRule + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateway_rules_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGatewayRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGatewayRule"]: + """List all Internet Gateway rules in the given subscription. + + :return: An iterator like instance of InternetGatewayRule + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGatewayRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGatewayRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateway_rules_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGatewayRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class InternetGatewaysOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`internet_gateways` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> _models.InternetGateway: + """Implements Gateway GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :return: InternetGateway. The InternetGateway is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternetGateway + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + + _request = build_internet_gateways_get_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternetGateway, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGateway, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateways_create_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: _models.InternetGateway, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGateway, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Creates a Network Fabric Service Internet Gateway resource instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: Request payload. Is one of the following types: InternetGateway, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGateway or JSON or IO[bytes] + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGateway, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternetGateway].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGatewayPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internet_gateways_update_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: _models.InternetGatewayPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + internet_gateway_name: str, + body: Union[_models.InternetGatewayPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternetGateway]: + """Execute patch on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :param body: API to update certain properties of the InternetGateway resource.. Is one of the + following types: InternetGatewayPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternetGatewayPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns InternetGateway. The InternetGateway is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternetGateway] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternetGateway, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternetGateway].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternetGateway]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internet_gateways_delete_request( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, internet_gateway_name: str, **kwargs: Any) -> LROPoller[None]: + """Execute a delete on Network Fabric Service Internet Gateway. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param internet_gateway_name: Name of the Internet Gateway. Required. + :type internet_gateway_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + internet_gateway_name=internet_gateway_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: + """Displays Internet Gateways list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of InternetGateway + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGateway]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateways_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGateway], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.InternetGateway"]: + """Displays Internet Gateways list by subscription GET method. + + :return: An iterator like instance of InternetGateway + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternetGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternetGateway]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internet_gateways_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternetGateway], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class IpCommunitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_communities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> _models.IpCommunity: + """Implements an IP Community GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :return: IpCommunity. The IpCommunity is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpCommunity + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + + _request = build_ip_communities_get_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpCommunity, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_communities_create_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: _models.IpCommunity, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """Implements an IP Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: Request payload. Is one of the following types: IpCommunity, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunity or JSON or IO[bytes] + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_communities_update_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: _models.IpCommunityPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + ip_community_name: str, + body: Union[_models.IpCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpCommunity]: + """API to update certain properties of the IP Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :param body: IP Community properties to update. Is one of the following types: + IpCommunityPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpCommunityPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns IpCommunity. The IpCommunity is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpCommunity] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_communities_delete_request( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, ip_community_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements IP Community DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_community_name: Name of the IP Community. Required. + :type ip_community_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_community_name=ip_community_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: + """Implements IP Communities list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpCommunity + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_communities_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpCommunity"]: + """Implements IP Communities list by subscription GET method. + + :return: An iterator like instance of IpCommunity + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_communities_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class IpExtendedCommunitiesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_extended_communities` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any + ) -> _models.IpExtendedCommunity: + """Implements IP Extended Community GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :return: IpExtendedCommunity. The IpExtendedCommunity is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + + _request = build_ip_extended_communities_get_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_extended_communities_create_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: _models.IpExtendedCommunity, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunity, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """Implements IP Extended Community PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: Request payload. Is one of the following types: IpExtendedCommunity, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity or JSON or IO[bytes] + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpExtendedCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_extended_communities_update_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: _models.IpExtendedCommunityPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + ip_extended_community_name: str, + body: Union[_models.IpExtendedCommunityPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpExtendedCommunity]: + """API to update certain properties of the IP Extended Community resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :param body: IP Extended Community properties to update. Is one of the following types: + IpExtendedCommunityPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpExtendedCommunityPatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns IpExtendedCommunity. The IpExtendedCommunity is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpExtendedCommunity] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpExtendedCommunity, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpExtendedCommunity].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpExtendedCommunity]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_extended_communities_delete_request( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, ip_extended_community_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements IP Extended Community DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_extended_community_name: Name of the IP Extended Community. Required. + :type ip_extended_community_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_extended_community_name=ip_extended_community_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.IpExtendedCommunity"]: + """Implements IpExtendedCommunities list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpExtendedCommunity + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_extended_communities_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpExtendedCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpExtendedCommunity"]: + """Implements IpExtendedCommunities list by subscription GET method. + + :return: An iterator like instance of IpExtendedCommunity + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpExtendedCommunity] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpExtendedCommunity]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_extended_communities_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpExtendedCommunity], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class IpPrefixesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`ip_prefixes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> _models.IpPrefix: + """Implements IP Prefix GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :return: IpPrefix. The IpPrefix is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.IpPrefix + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + + _request = build_ip_prefixes_get_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IpPrefix, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefix, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_prefixes_create_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: _models.IpPrefix, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefix, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """Implements IP Prefix PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: Request payload. Is one of the following types: IpPrefix, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefix or JSON or IO[bytes] + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpPrefix, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpPrefix].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_ip_prefixes_update_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: _models.IpPrefixPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + ip_prefix_name: str, + body: Union[_models.IpPrefixPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IpPrefix]: + """API to update certain properties of the IP Prefix resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :param body: IP Prefix properties to update. Is one of the following types: IpPrefixPatch, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.IpPrefixPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns IpPrefix. The IpPrefix is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IpPrefix] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IpPrefix, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IpPrefix].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IpPrefix]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_ip_prefixes_delete_request( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, ip_prefix_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements IP Prefix DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param ip_prefix_name: Name of the IP Prefix. Required. + :type ip_prefix_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_prefix_name=ip_prefix_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: + """Implements IpPrefixes list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IpPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpPrefix]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_prefixes_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpPrefix], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IpPrefix"]: + """Implements IpPrefixes list by subscription GET method. + + :return: An iterator like instance of IpPrefix + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.IpPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IpPrefix]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_ip_prefixes_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IpPrefix], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class L2IsolationDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`l2_isolation_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> _models.L2IsolationDomain: + """Implements L2 Isolation Domain GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: L2IsolationDomain. The L2IsolationDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_get_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_create_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.L2IsolationDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """Creates layer 2 network connectivity between compute nodes within a rack and across racks.The + configuration is applied on the devices only after the isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Is one of the following types: L2IsolationDomain, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomain or JSON or IO[bytes] + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.L2IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_update_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.L2IsolationDomainPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.L2IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.L2IsolationDomain]: + """API to update certain properties of the L2 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: API to update certain properties of the L2 Isolation Domain resource.. Is one of + the following types: L2IsolationDomainPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L2IsolationDomainPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns L2IsolationDomain. The L2IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L2IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L2IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.L2IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.L2IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_delete_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: + """Displays L2IsolationDomains list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of L2IsolationDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l2_isolation_domains_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L2IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L2IsolationDomain"]: + """Displays L2IsolationDomains list by subscription GET method. + + :return: An iterator like instance of L2IsolationDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L2IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L2IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l2_isolation_domains_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L2IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l2_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l2_isolation_domains_update_administrative_state_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l2_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + l2_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_validate_configuration_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_validate_configuration( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _commit_configuration_initial( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l2_isolation_domains_commit_configuration_request( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_commit_configuration( + self, resource_group_name: str, l2_isolation_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l2_isolation_domain_name: Name of the L2 Isolation Domain. Required. + :type l2_isolation_domain_name: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._commit_configuration_initial( + resource_group_name=resource_group_name, + l2_isolation_domain_name=l2_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class L3IsolationDomainsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`l3_isolation_domains` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> _models.L3IsolationDomain: + """Retrieves details of this L3 Isolation Domain. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: L3IsolationDomain. The L3IsolationDomain is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.L3IsolationDomain, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomain, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """Create isolation domain resources for layer 3 connectivity between compute nodes and for + communication with external services .This configuration is applied on the devices only after + the creation of networks is completed and isolation domain is enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Is one of the following types: L3IsolationDomain, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomain or JSON or IO[bytes] + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.L3IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.L3IsolationDomainPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.L3IsolationDomainPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.L3IsolationDomain]: + """API to update certain properties of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: API to update certain properties of the L3 Isolation Domain resource. Is one of + the following types: L3IsolationDomainPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.L3IsolationDomainPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns L3IsolationDomain. The L3IsolationDomain is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.L3IsolationDomain] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.L3IsolationDomain, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.L3IsolationDomain].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.L3IsolationDomain]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: + """Displays L3IsolationDomains list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of L3IsolationDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l3_isolation_domains_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L3IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.L3IsolationDomain"]: + """Displays L3IsolationDomains list by subscription GET method. + + :return: An iterator like instance of L3IsolationDomain + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.L3IsolationDomain] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.L3IsolationDomain]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_l3_isolation_domains_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.L3IsolationDomain], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_l3_isolation_domains_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the administrative state of the L3 Isolation Domain resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_validate_configuration_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_validate_configuration( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _commit_configuration_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_l3_isolation_domains_commit_configuration_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_commit_configuration( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._commit_configuration_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class InternalNetworksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`internal_networks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> _models.InternalNetwork: + """Gets a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :return: InternalNetwork. The InternalNetwork is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.InternalNetwork + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + + _request = build_internal_networks_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.InternalNetwork, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetwork, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Creates InternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: InternalNetwork, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetwork or JSON or IO[bytes] + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternalNetwork]: + """Updates a InternalNetworks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: InternalNetwork properties to update. Only annotations are supported. Is one of + the following types: InternalNetworkPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.InternalNetworkPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns InternalNetwork. The InternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_internal_networks_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, l3_isolation_domain_name: str, internal_network_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Implements InternalNetworks DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_l3_isolation_domain( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> ItemPaged["_models.InternalNetwork"]: + """Displays InternalNetworks list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An iterator like instance of InternalNetwork + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.InternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.InternalNetwork]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_internal_networks_list_by_l3_isolation_domain_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.InternalNetwork], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for InternalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_bgp_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_bgp_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkUpdateBgpAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_bgp_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]: + """Update BGP state for internalNetwork. Allowed only on edge devices. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: + InternalNetworkUpdateBgpAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of LROPoller that returns + InternalNetworkUpdateBgpAdministrativeStateResponse. The + InternalNetworkUpdateBgpAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBgpAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetworkUpdateBgpAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_bgp_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetworkUpdateBgpAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternalNetworkUpdateBgpAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD administrative state for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_internal_networks_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: _models.InternalNetworkUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "internal_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + internal_network_name: str, + body: Union[_models.InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param internal_network_name: Name of the Internal Network. Required. + :type internal_network_name: str + :param body: Request payload. Is one of the following types: + InternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of LROPoller that returns + InternalNetworkUpdateBfdAdministrativeStateResponse. The + InternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.InternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.InternalNetworkUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + internal_network_name=internal_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.InternalNetworkUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.InternalNetworkUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class ExternalNetworksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`external_networks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> _models.ExternalNetwork: + """Implements ExternalNetworks GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :return: ExternalNetwork. The ExternalNetwork is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + + _request = build_external_networks_get_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_create_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetwork, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetwork, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """Creates ExternalNetwork PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: ExternalNetwork, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetwork or JSON or IO[bytes] + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ExternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetworkPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ExternalNetwork]: + """API to update certain properties of the ExternalNetworks resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: ExternalNetwork properties to update. Only annotations are supported. Is one of + the following types: ExternalNetworkPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ExternalNetworkPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns ExternalNetwork. The ExternalNetwork is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetwork] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetwork, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ExternalNetwork].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ExternalNetwork]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_external_networks_delete_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, l3_isolation_domain_name: str, external_network_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Implements ExternalNetworks DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_l3_isolation_domain( + self, resource_group_name: str, l3_isolation_domain_name: str, **kwargs: Any + ) -> ItemPaged["_models.ExternalNetwork"]: + """Implements External Networks list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :return: An iterator like instance of ExternalNetwork + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.ExternalNetwork] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ExternalNetwork]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_external_networks_list_by_l3_isolation_domain_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ExternalNetwork], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Executes update operation to enable or disable administrative State for externalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update Static Route BFD for external Network. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_external_networks_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: _models.ExternalNetworkUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "l3_isolation_domain_name", + "external_network_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + l3_isolation_domain_name: str, + external_network_name: str, + body: Union[_models.ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]: + """BFD administrative state for either static or bgp for internalNetwork. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param l3_isolation_domain_name: Name of the L3 Isolation Domain. Required. + :type l3_isolation_domain_name: str + :param external_network_name: Name of the External Network. Required. + :type external_network_name: str + :param body: Request payload. Is one of the following types: + ExternalNetworkUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: + ~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of LROPoller that returns + ExternalNetworkUpdateBfdAdministrativeStateResponse. The + ExternalNetworkUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ExternalNetworkUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + l3_isolation_domain_name=l3_isolation_domain_name, + external_network_name=external_network_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ExternalNetworkUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ExternalNetworkUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NeighborGroupsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`neighbor_groups` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> _models.NeighborGroup: + """Gets the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: NeighborGroup. The NeighborGroup is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NeighborGroup + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_get_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NeighborGroup, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_neighbor_groups_create_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: _models.NeighborGroup, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroup, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Implements the Neighbor Group PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Request payload. Is one of the following types: NeighborGroup, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroup or JSON or IO[bytes] + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NeighborGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroupPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_neighbor_groups_update_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: _models.NeighborGroupPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + neighbor_group_name: str, + body: Union[_models.NeighborGroupPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NeighborGroup]: + """Updates the Neighbor Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :param body: Neighbor Group properties to update. Only annotations are supported. Is one of the + following types: NeighborGroupPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NeighborGroupPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NeighborGroup. The NeighborGroup is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NeighborGroup] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroup, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NeighborGroup].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NeighborGroup]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_delete_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements Neighbor Group DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: + """Displays NeighborGroups list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NeighborGroup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NeighborGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_neighbor_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NeighborGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NeighborGroup"]: + """Displays NeighborGroups list by subscription GET method. + + :return: An iterator like instance of NeighborGroup + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NeighborGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NeighborGroup]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_neighbor_groups_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NeighborGroup], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "neighbor_group_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_initial(self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_neighbor_groups_resync_request( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "neighbor_group_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync( + self, resource_group_name: str, neighbor_group_name: str, **kwargs: Any + ) -> LROPoller[_models.NeighborGroupResyncResponse]: + """Resync the Neighbor Group after a configuration change. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param neighbor_group_name: Name of the Neighbor Group. Required. + :type neighbor_group_name: str + :return: An instance of LROPoller that returns NeighborGroupResyncResponse. The + NeighborGroupResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NeighborGroupResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NeighborGroupResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_initial( + resource_group_name=resource_group_name, + neighbor_group_name=neighbor_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NeighborGroupResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NeighborGroupResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NeighborGroupResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkDeviceSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_device_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, network_device_sku_name: str, **kwargs: Any) -> _models.NetworkDeviceSku: + """Get a Network Device SKU details. + + :param network_device_sku_name: Name of the Network Device SKU. Required. + :type network_device_sku_name: str + :return: NetworkDeviceSku. The NetworkDeviceSku is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceSku] = kwargs.pop("cls", None) + + _request = build_network_device_skus_get_request( + network_device_sku_name=network_device_sku_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkDeviceSku, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDeviceSku"]: + """List Network Device SKUs for the given subscription. + + :return: An iterator like instance of NetworkDeviceSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDeviceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDeviceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_device_skus_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDeviceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkDevicesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_devices` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> _models.NetworkDevice: + """Gets the Network Device resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: NetworkDevice. The NetworkDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + + _request = build_network_devices_get_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_create_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Create a Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: NetworkDevice, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevice or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevicePatchParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_update_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDevicePatchParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDevicePatchParameters, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkDevice]: + """Update certain properties of the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Network Device properties to update. Is one of the following types: + NetworkDevicePatchParameters, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDevicePatchParameters or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkDevice. The NetworkDevice is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDevice] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_delete_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_device_name: str, **kwargs: Any) -> LROPoller[None]: + """Delete the Network Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: + """List all the Network Device resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkDevice + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkDevice"]: + """List all the Network Device resources in a given subscription. + + :return: An iterator like instance of NetworkDevice + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _reboot_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.RebootProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_reboot_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: _models.RebootProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_reboot( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.RebootProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Reboot the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: RebootProperties, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RebootProperties or JSON or IO[bytes] + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reboot_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _refresh_configuration_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_refresh_configuration_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_refresh_configuration( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceRefreshConfigurationResponse]: + """Refreshes the configuration the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of LROPoller that returns NetworkDeviceRefreshConfigurationResponse. The + NetworkDeviceRefreshConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRefreshConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceRefreshConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceRefreshConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDeviceRefreshConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDeviceRefreshConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_update_administrative_state_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: _models.UpdateDeviceAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpdateAdministrativeStateResponse. + The NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpdateAdministrativeStateResponse. + The NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpdateAdministrativeStateResponse. + The NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: UpdateDeviceAdministrativeState, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkDeviceUpdateAdministrativeStateResponse. + The NetworkDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceUpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceUpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDeviceUpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _upgrade_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDeviceUpgradeRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_upgrade_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: _models.NetworkDeviceUpgradeRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_upgrade( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.NetworkDeviceUpgradeRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceUpgradeResponse]: + """Upgrades the version of the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request payload. Is one of the following types: NetworkDeviceUpgradeRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkDeviceUpgradeResponse. The + NetworkDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceUpgradeResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceUpgradeResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDeviceUpgradeResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDeviceUpgradeResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def _run_ro_command_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRoCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_run_ro_command_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: _models.DeviceRoCommand, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRoCommand + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def begin_run_ro_command( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRoCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]: + """Run the RO Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Is one of the following types: DeviceRoCommand, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRoCommand or JSON or IO[bytes] + :return: An instance of LROPoller that returns + CommonPostActionResponseForDeviceROCommandsOperationStatusResult. The + CommonPostActionResponseForDeviceROCommandsOperationStatusResult is compatible with + MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._run_ro_command_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize( + _models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult, response.json() + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[ + _models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult + ].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForDeviceROCommandsOperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _run_rw_command_initial( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRwCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_devices_run_rw_command_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: _models.DeviceRwCommand, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRwCommand + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_run_rw_command( + self, + resource_group_name: str, + network_device_name: str, + body: Union[_models.DeviceRwCommand, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceRunRwCommandResponse]: + """Run the RW Command on the Network Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param body: Request the command. Is one of the following types: DeviceRwCommand, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DeviceRwCommand or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkDeviceRunRwCommandResponse. The + NetworkDeviceRunRwCommandResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceRunRwCommandResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkDeviceRunRwCommandResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._run_rw_command_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceRunRwCommandResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDeviceRunRwCommandResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDeviceRunRwCommandResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_passwords_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_resync_passwords_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync_passwords( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkDeviceResyncPasswordsResponse]: + """Resync the latest passwords to the Network Device. + + Updates the Network Device to use the latest passwords. Does not generate new passwords. Allows + network devices missed during a previous password rotation to be brought back into sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of LROPoller that returns NetworkDeviceResyncPasswordsResponse. The + NetworkDeviceResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkDeviceResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkDeviceResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkDeviceResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkDeviceResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkDeviceResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_certificates_initial( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_devices_resync_certificates_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_device_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync_certificates( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkFabricResyncCertificatesResponse]: + """Resync the latest certificates to the Network Device. + + Updates the Network Device to use the latest certificates. Does not generate new certificates. + Allows network devices missed during a previous certificate rotation to be brought back into + sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An instance of LROPoller that returns NetworkFabricResyncCertificatesResponse. The + NetworkFabricResyncCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_certificates_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricResyncCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricResyncCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkInterfacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_interfaces` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> _models.NetworkInterface: + """Get the Network Interface resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :return: NetworkInterface. The NetworkInterface is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkInterface + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + + _request = build_network_interfaces_get_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkInterface, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_create_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.NetworkInterface, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Create a Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Is one of the following types: NetworkInterface, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterface or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_update_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.NetworkInterfacePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.NetworkInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkInterface]: + """Update certain properties of the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: NetworkInterface properties to update. Only tags are supported. Is one of the + following types: NetworkInterfacePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkInterfacePatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkInterface. The NetworkInterface is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkInterface] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_interfaces_delete_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, network_device_name: str, network_interface_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Delete the Network Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_network_device( + self, resource_group_name: str, network_device_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkInterface"]: + """List all the Network Interface resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :return: An iterator like instance of NetworkInterface + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkInterface]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_interfaces_list_by_network_device_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkInterface], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "network_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_interfaces_update_administrative_state_request( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_device_name", + "network_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_device_name: str, + network_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_device_name: Name of the Network Device. Required. + :type network_device_name: str + :param network_interface_name: Name of the Network Interface. Required. + :type network_interface_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_device_name=network_device_name, + network_interface_name=network_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkFabricControllersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabric_controllers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> _models.NetworkFabricController: + """Shows the provisioning status of Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :return: NetworkFabricController. The NetworkFabricController is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + + _request = build_network_fabric_controllers_get_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricController, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabric_controllers_create_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: _models.NetworkFabricController, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricController, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Creates a Network Fabric Controller. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Request payload. Is one of the following types: NetworkFabricController, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricController or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricController].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricControllerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabric_controllers_update_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: _models.NetworkFabricControllerPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_fabric_controller_name: str, + body: Union[_models.NetworkFabricControllerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkFabricController]: + """Updates are currently not supported for the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :param body: Network Fabric Controller properties to update. Is one of the following types: + NetworkFabricControllerPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricControllerPatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkFabricController. The + NetworkFabricController is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabricController] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricController, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricController].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricController]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabric_controllers_delete_request( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, network_fabric_controller_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the Network Fabric Controller resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_controller_name: Name of the Network Fabric Controller. Required. + :type network_fabric_controller_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_controller_name=network_fabric_controller_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkFabricController"]: + """Lists all the NetworkFabricControllers thats available in the resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkFabricController + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricController]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_controllers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricController], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricController"]: + """Lists all the NetworkFabricControllers by subscription. + + :return: An iterator like instance of NetworkFabricController + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricController] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricController]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_controllers_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricController], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkFabricSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabric_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, network_fabric_sku_name: str, **kwargs: Any) -> _models.NetworkFabricSku: + """Implements Network Fabric SKU GET method. + + :param network_fabric_sku_name: Name of the Network Fabric SKU. Required. + :type network_fabric_sku_name: str + :return: NetworkFabricSku. The NetworkFabricSku is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabricSku + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricSku] = kwargs.pop("cls", None) + + _request = build_network_fabric_skus_get_request( + network_fabric_sku_name=network_fabric_sku_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabricSku, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabricSku"]: + """Implements Network Fabric SKUs list by subscription GET method. + + :return: An iterator like instance of NetworkFabricSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabricSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabricSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabric_skus_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabricSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkFabricsOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_fabrics` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> _models.NetworkFabric: + """Get Network Fabric resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: NetworkFabric. The NetworkFabric is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkFabric + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + + _request = build_network_fabrics_get_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkFabric, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_create_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabric, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabric, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Create Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: NetworkFabric, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabric or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabric, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabric].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabricPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkFabric]: + """Update certain properties of the Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Is one of the following types: + NetworkFabricPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkFabric. The NetworkFabric is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkFabric] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabric, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabric].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabric]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_delete_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> LROPoller[None]: + """Delete Network Fabric resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: + """List all the Network Fabric resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkFabric + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabric]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabrics_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabric], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkFabric"]: + """List all the Network Fabric resources in the given subscription. + + :return: An iterator like instance of NetworkFabric + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkFabric] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkFabric]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_fabrics_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkFabric], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _provision_initial(self, resource_group_name: str, network_fabric_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_provision_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_provision( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Provisions the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._provision_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _deprovision_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_deprovision_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_deprovision( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Deprovisions the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._deprovision_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _upgrade_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_upgrade_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpgradeNetworkFabricProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_upgrade( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpgradeNetworkFabricProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Upgrades the version of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Network Fabric properties to update. Is one of the following types: + UpgradeNetworkFabricProperties, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpgradeNetworkFabricProperties or JSON or + IO[bytes] + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _refresh_configuration_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_refresh_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_refresh_configuration( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Refreshes the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_workload_management_bfd_configuration_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_workload_management_bfd_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_workload_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Workload Management BFD Configuration of the underlying resources in the given + Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_workload_management_bfd_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_infra_management_bfd_configuration_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_update_infra_management_bfd_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_infra_management_bfd_configuration( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Infra Management BFD Configuration of the underlying resources in the given Network + Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_infra_management_bfd_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.ValidateConfigurationProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_validate_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.ValidateConfigurationProperties, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_validate_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.ValidateConfigurationProperties, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Validate configuration properties. Is one of the following types: + ValidateConfigurationProperties, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.ValidateConfigurationProperties or JSON or + IO[bytes] + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _get_topology_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_get_topology_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_get_topology( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.GetTopologyResponse]: + """Gets Topology of the underlying resources in the given Network Fabric instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns GetTopologyResponse. The GetTopologyResponse is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.GetTopologyResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GetTopologyResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_topology_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.GetTopologyResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GetTopologyResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GetTopologyResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _commit_configuration_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[Union[_models.CommitConfigurationRequest, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" if body else None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + else: + _content = None + + _request = build_network_fabrics_commit_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[_models.CommitConfigurationRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitConfigurationRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[JSON] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_commit_configuration( + self, + resource_group_name: str, + network_fabric_name: str, + body: Optional[Union[_models.CommitConfigurationRequest, JSON, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[_models.CommitConfigurationResponse]: + """Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric + level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: The content of the action request. Is one of the following types: + CommitConfigurationRequest, JSON, IO[bytes] Default value is None. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitConfigurationRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CommitConfigurationResponse. The + CommitConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None + cls: ClsType[_models.CommitConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._commit_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommitConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommitConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommitConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _commit_batch_status_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.CommitBatchStatusRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_commit_batch_status_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.CommitBatchStatusRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitBatchStatusRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_commit_batch_status( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.CommitBatchStatusRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CommitBatchStatusOperationResponse]: + """Post action: Returns a status of commit batch operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: CommitBatchStatusRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.CommitBatchStatusRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CommitBatchStatusOperationResponse. The + CommitBatchStatusOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommitBatchStatusOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommitBatchStatusOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._commit_batch_status_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommitBatchStatusOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommitBatchStatusOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommitBatchStatusOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _discard_commit_batch_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.DiscardCommitBatchRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_discard_commit_batch_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.DiscardCommitBatchRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_discard_commit_batch( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.DiscardCommitBatchRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DiscardCommitBatchOperationResponse]: + """Post action: Discards a Batch operation in progress. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: DiscardCommitBatchRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns DiscardCommitBatchOperationResponse. The + DiscardCommitBatchOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.DiscardCommitBatchOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiscardCommitBatchOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._discard_commit_batch_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiscardCommitBatchOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DiscardCommitBatchOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DiscardCommitBatchOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _lock_fabric_initial( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricLockRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_fabrics_lock_fabric_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: _models.NetworkFabricLockRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_lock_fabric( + self, + resource_group_name: str, + network_fabric_name: str, + body: Union[_models.NetworkFabricLockRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.OperationStatusResult]: + """Post action: Triggers network fabric lock operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param body: Request payload. Is one of the following types: NetworkFabricLockRequest, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkFabricLockRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns OperationStatusResult. The OperationStatusResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.OperationStatusResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._lock_fabric_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.OperationStatusResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.OperationStatusResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _view_device_configuration_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_view_device_configuration_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_view_device_configuration( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.ViewDeviceConfigurationOperationResponse]: + """Post action: Triggers view of network fabric configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns ViewDeviceConfigurationOperationResponse. The + ViewDeviceConfigurationOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ViewDeviceConfigurationOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ViewDeviceConfigurationOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._view_device_configuration_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ViewDeviceConfigurationOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ViewDeviceConfigurationOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ViewDeviceConfigurationOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _arm_configuration_diff_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_arm_configuration_diff_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_arm_configuration_diff( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.ArmConfigurationDiffOperationResponse]: + """Post action: Triggers diff of NetworkFabric ARM Configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns ArmConfigurationDiffOperationResponse. The + ArmConfigurationDiffOperationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ArmConfigurationDiffOperationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArmConfigurationDiffOperationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._arm_configuration_diff_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ArmConfigurationDiffOperationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ArmConfigurationDiffOperationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ArmConfigurationDiffOperationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _rotate_passwords_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_rotate_passwords_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_rotate_passwords( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkFabricRotatePasswordsResponse]: + """Rotate all passwords on the Terminal Server and Network Devices. + + Creates new passwords, then updates the Terminal Server and Network Devices to use the new + passwords. + + Note that disabled devices cannot be updated and must be resynchronized with the new passwords + once they are enabled. + + Fails if any of the devices could not be updated with the new password. + Failed devices should be resynchronized with the new passwords once possible. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns NetworkFabricRotatePasswordsResponse. The + NetworkFabricRotatePasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricRotatePasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricRotatePasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_passwords_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricRotatePasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricRotatePasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricRotatePasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_passwords_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_resync_passwords_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync_passwords( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkFabricResyncPasswordsResponse]: + """Resync the latest passwords to the Terminal Server and Network Devices. + + Updates the Terminal Server and all Network Devices to use the latest passwords. Does not + generate new passwords. + + Allows devices to be brought back in sync after a partially successful password rotation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns NetworkFabricResyncPasswordsResponse. The + NetworkFabricResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _rotate_certificates_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_rotate_certificates_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_rotate_certificates( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkFabricRotateCertificatesResponse]: + """Rotate all certificates on Network Devices. + + Creates new certificates, then updates the Network Devices to use the new certificates. Note + that disabled devices cannot be updated and must be resynchronized with the new certificates + once they are enabled. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns NetworkFabricRotateCertificatesResponse. The + NetworkFabricRotateCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricRotateCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricRotateCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_certificates_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricRotateCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricRotateCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricRotateCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_certificates_initial( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_fabrics_resync_certificates_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_fabric_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync_certificates( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkFabricResyncCertificatesResponse]: + """Re-sync all certificates on Network Devices. + + Updates all Network Devices to use the latest certificates. Does not generate new certificates. + Allows network devices missed during a previous certificate rotation to be brought back into + sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An instance of LROPoller that returns NetworkFabricResyncCertificatesResponse. The + NetworkFabricResyncCertificatesResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkFabricResyncCertificatesResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkFabricResyncCertificatesResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_certificates_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkFabricResyncCertificatesResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkFabricResyncCertificatesResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkFabricResyncCertificatesResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkToNetworkInterconnectsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_to_network_interconnects` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> _models.NetworkToNetworkInterconnect: + """Implements NetworkToNetworkInterconnects GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :return: NetworkToNetworkInterconnect. The NetworkToNetworkInterconnect is compatible with + MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + + _request = build_network_to_network_interconnects_get_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnect, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_create_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NetworkToNetworkInterconnect, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnect, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Configuration used to setup CE-PE connectivity PUT Method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: NetworkToNetworkInterconnect, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnectPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NetworkToNetworkInterconnectPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NetworkToNetworkInterconnectPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkToNetworkInterconnect]: + """Update certain properties of the Network To NetworkInterconnects resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Network to Network Interconnect properties to update. Is one of the following + types: NetworkToNetworkInterconnectPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnectPatch or JSON + or IO[bytes] + :return: An instance of LROPoller that returns NetworkToNetworkInterconnect. The + NetworkToNetworkInterconnect is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkToNetworkInterconnect] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkToNetworkInterconnect, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkToNetworkInterconnect].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkToNetworkInterconnect]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_to_network_interconnects_delete_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Implements NetworkToNetworkInterconnects DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_network_fabric( + self, resource_group_name: str, network_fabric_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkToNetworkInterconnect"]: + """Implements Network To Network Interconnects list by Network Fabric GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :return: An iterator like instance of NetworkToNetworkInterconnect + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkToNetworkInterconnect] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkToNetworkInterconnect]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_to_network_interconnects_list_by_network_fabric_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkToNetworkInterconnect], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_npb_static_route_bfd_administrative_state_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_npb_static_route_bfd_administrative_state( # pylint: disable=name-too-long + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the NPB Static Route BFD Administrative State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_npb_static_route_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_bfd_administrative_state_initial( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_to_network_interconnects_update_bfd_administrative_state_request( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: _models.NniUpdateBfdAdministrativeStateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NniUpdateBfdAdministrativeStateResponse. The + NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NniUpdateBfdAdministrativeStateResponse. The + NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NniUpdateBfdAdministrativeStateResponse. The + NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_fabric_name", + "network_to_network_interconnect_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_bfd_administrative_state( + self, + resource_group_name: str, + network_fabric_name: str, + network_to_network_interconnect_name: str, + body: Union[_models.NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NniUpdateBfdAdministrativeStateResponse]: + """Updates the Admin State. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_fabric_name: Name of the Network Fabric. Required. + :type network_fabric_name: str + :param network_to_network_interconnect_name: Name of the Network to Network Interconnect. + Required. + :type network_to_network_interconnect_name: str + :param body: Request payload. Is one of the following types: + NniUpdateBfdAdministrativeStateRequest, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateRequest or + JSON or IO[bytes] + :return: An instance of LROPoller that returns NniUpdateBfdAdministrativeStateResponse. The + NniUpdateBfdAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NniUpdateBfdAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NniUpdateBfdAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_bfd_administrative_state_initial( + resource_group_name=resource_group_name, + network_fabric_name=network_fabric_name, + network_to_network_interconnect_name=network_to_network_interconnect_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NniUpdateBfdAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NniUpdateBfdAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NniUpdateBfdAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkPacketBrokersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_packet_brokers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any + ) -> _models.NetworkPacketBroker: + """Retrieves details of this Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :return: NetworkPacketBroker. The NetworkPacketBroker is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + + _request = build_network_packet_brokers_get_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBroker, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_packet_brokers_create_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: _models.NetworkPacketBroker, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBroker, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """Creates a Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Request payload. Is one of the following types: NetworkPacketBroker, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkPacketBroker].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBrokerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_packet_brokers_update_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: _models.NetworkPacketBrokerPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_packet_broker_name: str, + body: Union[_models.NetworkPacketBrokerPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkPacketBroker]: + """API to update certain properties of the Network Packet Broker resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :param body: Network Packet Broker properties to update. Is one of the following types: + NetworkPacketBrokerPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkPacketBrokerPatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkPacketBroker. The NetworkPacketBroker is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkPacketBroker] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkPacketBroker, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkPacketBroker].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkPacketBroker]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_packet_brokers_delete_request( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_packet_broker_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes Network Packet Broker. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_packet_broker_name: Name of the Network Packet Broker. Required. + :type network_packet_broker_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_packet_broker_name=network_packet_broker_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkPacketBroker"]: + """Displays NetworkPacketBrokers list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkPacketBroker + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_packet_brokers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkPacketBroker], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkPacketBroker"]: + """Displays Network Packet Brokers list by subscription GET method. + + :return: An iterator like instance of NetworkPacketBroker + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkPacketBroker] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkPacketBroker]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_packet_brokers_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkPacketBroker], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkRacksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_racks` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> _models.NetworkRack: + """Get Network Rack resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :return: NetworkRack. The NetworkRack is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkRack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + + _request = build_network_racks_get_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkRack, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_racks_create_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: _models.NetworkRack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRack, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Create Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Request payload. Is one of the following types: NetworkRack, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRack or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkRack, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkRack].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRackPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_racks_update_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: _models.NetworkRackPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRackPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_rack_name: str, + body: Union[_models.NetworkRackPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkRack]: + """Update certain properties of the Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :param body: Network Rack properties to update. Is one of the following types: + NetworkRackPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkRackPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkRack. The NetworkRack is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkRack] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkRack, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkRack].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkRack]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_racks_delete_request( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_rack_name: str, **kwargs: Any) -> LROPoller[None]: + """Delete Network Rack resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_rack_name: Name of the Network Rack. Required. + :type network_rack_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_rack_name=network_rack_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: + """List all Network Rack resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkRack + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkRack]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_racks_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkRack], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkRack"]: + """List all Network Rack resources in the given subscription. + + :return: An iterator like instance of NetworkRack + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkRack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkRack]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_racks_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkRack], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class NetworkTapRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_tap_rules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> _models.NetworkTapRule: + """Get Network Tap Rule resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: NetworkTapRule. The NetworkTapRule is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_get_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRule, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_create_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.NetworkTapRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRule, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Create Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Is one of the following types: NetworkTapRule, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRule or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTapRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_update_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.NetworkTapRulePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.NetworkTapRulePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkTapRule]: + """Update certain properties of the Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Network Tap Rule properties to update. Is one of the following types: + NetworkTapRulePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapRulePatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkTapRule. The NetworkTapRule is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTapRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTapRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTapRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_delete_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> LROPoller[None]: + """Delete Network Tap Rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: + """List all the Network Tap Rule resources in the given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkTapRule + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTapRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_tap_rules_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTapRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTapRule"]: + """List all the Network Tap Rule resources in the given subscription. + + :return: An iterator like instance of NetworkTapRule + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTapRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTapRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_tap_rules_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTapRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_tap_rules_update_administrative_state_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_rule_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_rule_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_initial(self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_resync_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_rule_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkTapRuleResyncResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of LROPoller that returns NetworkTapRuleResyncResponse. The + NetworkTapRuleResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapRuleResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapRuleResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapRuleResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTapRuleResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTapRuleResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_tap_rules_validate_configuration_request( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_validate_configuration( + self, resource_group_name: str, network_tap_rule_name: str, **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_rule_name: Name of the Network Tap Rule. Required. + :type network_tap_rule_name: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + network_tap_rule_name=network_tap_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkTapsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_taps` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> _models.NetworkTap: + """Retrieves details of this Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: NetworkTap. The NetworkTap is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkTap + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + + _request = build_network_taps_get_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkTap, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTap, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_create_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.NetworkTap, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTap, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """Creates a Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Is one of the following types: NetworkTap, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTap or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTap, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_update_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.NetworkTapPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.NetworkTapPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkTap]: + """API to update certain properties of the Network Tap resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Network Tap properties to update. Is one of the following types: NetworkTapPatch, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkTapPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkTap. The NetworkTap is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkTap] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTap, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_taps_delete_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes Network Tap. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: + """Displays Network Taps list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkTap + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTap]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTap], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkTap"]: + """Displays Network Taps list by subscription GET method. + + :return: An iterator like instance of NetworkTap + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkTap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkTap]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_taps_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkTap], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_tap_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_taps_update_administrative_state_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_tap_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_tap_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_initial(self, resource_group_name: str, network_tap_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_taps_resync_request( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_tap_name", "accept"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync( + self, resource_group_name: str, network_tap_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkTapResyncResponse]: + """Implements the operation to the underlying resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_tap_name: Name of the Network Tap. Required. + :type network_tap_name: str + :return: An instance of LROPoller that returns NetworkTapResyncResponse. The + NetworkTapResyncResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkTapResyncResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkTapResyncResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_initial( + resource_group_name=resource_group_name, + network_tap_name=network_tap_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkTapResyncResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkTapResyncResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkTapResyncResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class RoutePoliciesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`route_policies` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: + """Implements Route Policy GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: RoutePolicy. The RoutePolicy is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + + _request = build_route_policies_get_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RoutePolicy, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_create_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.RoutePolicy, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicy, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """Implements Route Policy PUT method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Is one of the following types: RoutePolicy, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or JSON or IO[bytes] + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.RoutePolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.RoutePolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_update_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.RoutePolicyPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.RoutePolicyPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.RoutePolicy]: + """API to update certain properties of the Route Policy resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Route Policy properties to update. Is one of the following types: + RoutePolicyPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns RoutePolicy. The RoutePolicy is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.RoutePolicy, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.RoutePolicy].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.RoutePolicy]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_delete_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> LROPoller[None]: + """Implements Route Policy DELETE method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: + """Implements RoutePolicies list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of RoutePolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RoutePolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_route_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RoutePolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: + """Implements RoutePolicies list by subscription GET method. + + :return: An iterator like instance of RoutePolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.RoutePolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_route_policies_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.RoutePolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "route_policy_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_route_policies_update_administrative_state_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "route_policy_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + route_policy_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.UpdateAdministrativeStateResponse]: + """Updated the admin state for this Route Policy. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns UpdateAdministrativeStateResponse. The + UpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.UpdateAdministrativeStateResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.UpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.UpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _validate_configuration_initial( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_validate_configuration_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_validate_configuration( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> LROPoller[_models.ValidateConfigurationResponse]: + """Validates the configuration of the resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of LROPoller that returns ValidateConfigurationResponse. The + ValidateConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._validate_configuration_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ValidateConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ValidateConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _commit_configuration_initial( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_route_policies_commit_configuration_request( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_commit_configuration( + self, resource_group_name: str, route_policy_name: str, **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Commits the configuration of the given resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param route_policy_name: Name of the Route Policy. Required. + :type route_policy_name: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._commit_configuration_initial( + resource_group_name=resource_group_name, + route_policy_name=route_policy_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkMonitorsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_monitors` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def get(self, resource_group_name: str, network_monitor_name: str, **kwargs: Any) -> _models.NetworkMonitor: + """Implements NetworkMonitor GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :return: NetworkMonitor. The NetworkMonitor is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + + _request = build_network_monitors_get_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def _create_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitor, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_create_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.NetworkMonitor, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def begin_create( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitor, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """Creates NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Resource create parameters. Is one of the following types: NetworkMonitor, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitor or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkMonitor].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkMonitor]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def _update_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitorPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_update_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.NetworkMonitorPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def begin_update( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.NetworkMonitorPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkMonitor]: + """API to update certain properties of the NetworkMonitor resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: The resource properties to be updated. Is one of the following types: + NetworkMonitorPatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkMonitorPatch or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkMonitor. The NetworkMonitor is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkMonitor] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkMonitor, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkMonitor].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkMonitor]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "network_monitor_name"] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def _delete_initial(self, resource_group_name: str, network_monitor_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_monitors_delete_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "network_monitor_name"] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def begin_delete(self, resource_group_name: str, network_monitor_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes layer 2 connectivity between compute nodes by managed by named NetworkMonitor name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={"2024-06-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.NetworkMonitor"]: + """Displays NetworkMonitors list by resource group GET method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkMonitor + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkMonitor]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_monitors_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkMonitor], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={"2024-06-15-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkMonitor"]: + """Displays NetworkMonitors list by subscription GET method. + + :return: An iterator like instance of NetworkMonitor + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkMonitor] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkMonitor]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_monitors_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkMonitor], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_monitors_update_administrative_state_request( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForDeviceUpdate. The + CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForDeviceUpdate. The + CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForDeviceUpdate. The + CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2024-06-15-preview", + params_added_on={ + "2024-06-15-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_monitor_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2024-06-15-preview", "2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_monitor_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: + """Enables isolation domain across the fabric or on specified racks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_monitor_name: Name of the Network Monitor. Required. + :type network_monitor_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CommonPostActionResponseForDeviceUpdate. The + CommonPostActionResponseForDeviceUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_monitor_name=network_monitor_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForDeviceUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkBootstrapDevicesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_bootstrap_devices` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ManagedNetworkFabricMgmtClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def get( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> _models.NetworkBootstrapDevice: + """Gets a Network Bootstrap Device resource details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: NetworkBootstrapDevice. The NetworkBootstrapDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_get_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _create_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_create_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.NetworkBootstrapDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Creates a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: NetworkBootstrapDevice, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_update_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.NetworkBootstrapDevicePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.NetworkBootstrapDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDevice]: + """Update certain properties of the Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Network Bootstrap Device properties to update. Is one of the following types: + NetworkBootstrapDevicePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevicePatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkBootstrapDevice. The + NetworkBootstrapDevice is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDevice] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDevice, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDevice].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDevice]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_bootstrap_device_name"] + }, + api_versions_list=["2025-07-15"], + ) + def _delete_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_delete_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": ["api_version", "subscription_id", "resource_group_name", "network_bootstrap_device_name"] + }, + api_versions_list=["2025-07-15"], + ) + def begin_delete( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Network Bootstrap Device resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={"2025-07-15": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2025-07-15"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkBootstrapDevice"]: + """Lists all the Network Bootstrap Device resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of NetworkBootstrapDevice + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkBootstrapDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_bootstrap_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={"2025-07-15": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2025-07-15"], + ) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.NetworkBootstrapDevice"]: + """List all the Network Bootstrap Device resources in a given subscription. + + :return: An iterator like instance of NetworkBootstrapDevice + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NetworkBootstrapDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_network_bootstrap_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapDevice], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _reboot_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_reboot_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_reboot( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceRebootResponse]: + """Reboot the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of LROPoller that returns NetworkBootstrapDeviceRebootResponse. The + NetworkBootstrapDeviceRebootResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRebootResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceRebootResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reboot_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceRebootResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDeviceRebootResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDeviceRebootResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _refresh_configuration_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_refresh_configuration_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_refresh_configuration( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse]: + """Refreshes the configuration of Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of LROPoller that returns + NetworkBootstrapDeviceRefreshConfigurationResponse. The + NetworkBootstrapDeviceRefreshConfigurationResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceRefreshConfigurationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceRefreshConfigurationResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_configuration_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceRefreshConfigurationResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDeviceRefreshConfigurationResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _upgrade_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateVersion, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_upgrade_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.UpdateVersion, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_upgrade( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateVersion, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]: + """Upgrades the version of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: UpdateVersion, JSON, IO[bytes] + Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateVersion or JSON or IO[bytes] + :return: An instance of LROPoller that returns NetworkBootstrapDeviceUpgradeResponse. The + NetworkBootstrapDeviceUpgradeResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpgradeResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDeviceUpgradeResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceUpgradeResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDeviceUpgradeResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_devices_update_administrative_state_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: _models.UpdateDeviceAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + body: Union[_models.UpdateDeviceAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]: + """Updates the Administrative state of the Network Bootstrap Device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param body: Request payload. Is one of the following types: UpdateDeviceAdministrativeState, + JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateDeviceAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns + NetworkBootstrapDeviceUpdateAdministrativeStateResponse. The + NetworkBootstrapDeviceUpdateAdministrativeStateResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize( + _models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse, response.json() + ) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDeviceUpdateAdministrativeStateResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _resync_passwords_initial( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_devices_resync_passwords_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_resync_passwords( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse]: + """Resync the latest passwords to the Network Bootstrap Device. + + Updates the Network Bootstrap Device to use the latest passwords. Does not generate new + passwords. Allows network bootstrap devices missed during a previous password rotation to be + brought back into sync. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An instance of LROPoller that returns NetworkBootstrapDeviceResyncPasswordsResponse. + The NetworkBootstrapDeviceResyncPasswordsResponse is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapDeviceResyncPasswordsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapDeviceResyncPasswordsResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._resync_passwords_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapDeviceResyncPasswordsResponse, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapDeviceResyncPasswordsResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class NetworkBootstrapInterfacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s + :attr:`network_bootstrap_interfaces` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -78,18 +39515,860 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """Returns list of all operations. + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def get( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> _models.NetworkBootstrapInterface: + """Get the Network Bootstrap Interface resource details. - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.Operation] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :return: NetworkBootstrapInterface. The NetworkBootstrapInterface is compatible with + MutableMapping + :rtype: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_interfaces_get_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _create_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_create_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.NetworkBootstrapInterface, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_create( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterface, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Create a Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Is one of the following types: NetworkBootstrapInterface, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_update_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.NetworkBootstrapInterfacePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.NetworkBootstrapInterfacePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.NetworkBootstrapInterface]: + """Update certain properties of the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: NetworkBootstrapInterface properties to update. Only tags are supported. Is one of + the following types: NetworkBootstrapInterfacePatch, JSON, IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterfacePatch or JSON or + IO[bytes] + :return: An instance of LROPoller that returns NetworkBootstrapInterface. The + NetworkBootstrapInterface is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.NetworkBootstrapInterface] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.NetworkBootstrapInterface, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.NetworkBootstrapInterface].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.NetworkBootstrapInterface]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _delete_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_network_bootstrap_interfaces_delete_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_delete( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Delete the Network Bootstrap Interface resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def list_by_network_bootstrap_device( + self, resource_group_name: str, network_bootstrap_device_name: str, **kwargs: Any + ) -> ItemPaged["_models.NetworkBootstrapInterface"]: + """List all the Network Bootstrap Interface resources in a given resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :return: An iterator like instance of NetworkBootstrapInterface + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.NetworkBootstrapInterface] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.NetworkBootstrapInterface]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -102,12 +40381,20 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_network_bootstrap_interfaces_list_by_network_bootstrap_device_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -120,18 +40407,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NetworkBootstrapInterface], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + return deserialized.get("nextLink") or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) @@ -144,12 +40442,296 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( + error = _failsafe_deserialize( _models.ErrorResponse, - pipeline_response, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def _update_administrative_state_initial( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_network_bootstrap_interfaces_update_administrative_state_request( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: _models.UpdateAdministrativeState, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2025-07-15", + params_added_on={ + "2025-07-15": [ + "api_version", + "subscription_id", + "resource_group_name", + "network_bootstrap_device_name", + "network_bootstrap_interface_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2025-07-15"], + ) + def begin_update_administrative_state( + self, + resource_group_name: str, + network_bootstrap_device_name: str, + network_bootstrap_interface_name: str, + body: Union[_models.UpdateAdministrativeState, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: + """Update the admin state of the Network Interface. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param network_bootstrap_device_name: Name of the Network Bootstrap Device. Required. + :type network_bootstrap_device_name: str + :param network_bootstrap_interface_name: Name of the Network Bootstrap Interface. Required. + :type network_bootstrap_interface_name: str + :param body: Request payload. Is one of the following types: UpdateAdministrativeState, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or JSON or + IO[bytes] + :return: An instance of LROPoller that returns CommonPostActionResponseForStateUpdate. The + CommonPostActionResponseForStateUpdate is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_administrative_state_initial( + resource_group_name=resource_group_name, + network_bootstrap_device_name=network_bootstrap_device_name, + network_bootstrap_interface_name=network_bootstrap_interface_name, + body=body, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.CommonPostActionResponseForStateUpdate, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CommonPostActionResponseForStateUpdate]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py index 49900f6ab120..87676c65a8f0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_patch.py @@ -1,15 +1,15 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py deleted file mode 100644 index 8427a01e58b4..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/azure/mgmt/managednetworkfabric/operations/_route_policies_operations.py +++ /dev/null @@ -1,1561 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ManagedNetworkFabricMgmtClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_create_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/routePolicies" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_administrative_state_request( # pylint: disable=name-too-long - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_validate_configuration_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_commit_configuration_request( - resource_group_name: str, route_policy_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-15")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "routePolicyName": _SERIALIZER.url("route_policy_name", route_policy_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class RoutePoliciesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.managednetworkfabric.ManagedNetworkFabricMgmtClient`'s - :attr:`route_policies` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ManagedNetworkFabricMgmtClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _create_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicy, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RoutePolicy") - - _request = build_create_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.RoutePolicy, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicy, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Create Route Policy. - - Implements Route Policy PUT method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Is either a RoutePolicy type or a IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicy or IO[bytes] - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.RoutePolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.RoutePolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> _models.RoutePolicy: - """Gets a Route Policy. - - Implements Route Policy GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: RoutePolicy or the result of cls(response) - :rtype: ~azure.mgmt.managednetworkfabric.models.RoutePolicy - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicyPatch, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "RoutePolicyPatch") - - _request = build_update_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.RoutePolicyPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.RoutePolicyPatch, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.RoutePolicy]: - """Updates a Route Policy. - - API to update certain properties of the Route Policy resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Route Policy properties to update. Is either a RoutePolicyPatch type or a - IO[bytes] type. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.RoutePolicyPatch or IO[bytes] - :return: An instance of LROPoller that returns either RoutePolicy or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RoutePolicy] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("RoutePolicy", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.RoutePolicy].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.RoutePolicy]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, route_policy_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Route Policy. - - Implements Route Policy DELETE method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: - """List RoutePolicies by resource group. - - Implements RoutePolicies list by resource group GET method. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either RoutePolicy or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.RoutePolicy"]: - """List RoutePolicies by subscription. - - Implements RoutePolicies list by subscription GET method. - - :return: An iterator like instance of either RoutePolicy or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.managednetworkfabric.models.RoutePolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoutePoliciesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RoutePoliciesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _update_administrative_state_initial( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _json = self._serialize.body(body, "UpdateAdministrativeState") - - _request = build_update_administrative_state_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: _models.UpdateAdministrativeState, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_administrative_state( - self, - resource_group_name: str, - route_policy_name: str, - body: Union[_models.UpdateAdministrativeState, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForDeviceUpdate]: - """Executes enable operation to the underlying resources. - - Updated the admin state for this Route Policy. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :param body: Request payload. Is either a UpdateAdministrativeState type or a IO[bytes] type. - Required. - :type body: ~azure.mgmt.managednetworkfabric.models.UpdateAdministrativeState or IO[bytes] - :return: An instance of LROPoller that returns either CommonPostActionResponseForDeviceUpdate - or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CommonPostActionResponseForDeviceUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_administrative_state_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - body=body, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForDeviceUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForDeviceUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _validate_configuration_initial( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_validate_configuration_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_validate_configuration( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> LROPoller[_models.ValidateConfigurationResponse]: - """Validates the configuration of the resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of LROPoller that returns either ValidateConfigurationResponse or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.ValidateConfigurationResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ValidateConfigurationResponse] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._validate_configuration_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ValidateConfigurationResponse", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ValidateConfigurationResponse].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ValidateConfigurationResponse]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _commit_configuration_initial( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_commit_configuration_request( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_commit_configuration( - self, resource_group_name: str, route_policy_name: str, **kwargs: Any - ) -> LROPoller[_models.CommonPostActionResponseForStateUpdate]: - """Execute the commit on the resources. - - Commits the configuration of the given resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param route_policy_name: Name of the Route Policy. Required. - :type route_policy_name: str - :return: An instance of LROPoller that returns either CommonPostActionResponseForStateUpdate or - the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.managednetworkfabric.models.CommonPostActionResponseForStateUpdate] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CommonPostActionResponseForStateUpdate] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._commit_configuration_initial( - resource_group_name=resource_group_name, - route_policy_name=route_policy_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CommonPostActionResponseForStateUpdate", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CommonPostActionResponseForStateUpdate].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CommonPostActionResponseForStateUpdate]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_typespec.json b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_typespec.json new file mode 100644 index 000000000000..3a45aea046a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/code_report_typespec.json @@ -0,0 +1,155304 @@ +{ + "azure.mgmt.managednetworkfabric": { + "class_nodes": { + "ManagedNetworkFabricMgmtClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "HttpResponse", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "access_control_lists": { + "attr_type": "AccessControlListsOperations" + }, + "internet_gateway_rules": { + "attr_type": "InternetGatewayRulesOperations" + }, + "internet_gateways": { + "attr_type": "InternetGatewaysOperations" + }, + "ip_communities": { + "attr_type": "IpCommunitiesOperations" + }, + "ip_extended_communities": { + "attr_type": "IpExtendedCommunitiesOperations" + }, + "ip_prefixes": { + "attr_type": "IpPrefixesOperations" + }, + "l2_isolation_domains": { + "attr_type": "L2IsolationDomainsOperations" + }, + "l3_isolation_domains": { + "attr_type": "L3IsolationDomainsOperations" + }, + "internal_networks": { + "attr_type": "InternalNetworksOperations" + }, + "external_networks": { + "attr_type": "ExternalNetworksOperations" + }, + "neighbor_groups": { + "attr_type": "NeighborGroupsOperations" + }, + "network_device_skus": { + "attr_type": "NetworkDeviceSkusOperations" + }, + "network_devices": { + "attr_type": "NetworkDevicesOperations" + }, + "network_interfaces": { + "attr_type": "NetworkInterfacesOperations" + }, + "network_fabric_controllers": { + "attr_type": "NetworkFabricControllersOperations" + }, + "network_fabric_skus": { + "attr_type": "NetworkFabricSkusOperations" + }, + "network_fabrics": { + "attr_type": "NetworkFabricsOperations" + }, + "network_to_network_interconnects": { + "attr_type": "NetworkToNetworkInterconnectsOperations" + }, + "network_packet_brokers": { + "attr_type": "NetworkPacketBrokersOperations" + }, + "network_racks": { + "attr_type": "NetworkRacksOperations" + }, + "network_tap_rules": { + "attr_type": "NetworkTapRulesOperations" + }, + "network_taps": { + "attr_type": "NetworkTapsOperations" + }, + "route_policies": { + "attr_type": "RoutePoliciesOperations" + }, + "network_monitors": { + "attr_type": "NetworkMonitorsOperations" + }, + "network_bootstrap_devices": { + "attr_type": "NetworkBootstrapDevicesOperations" + }, + "network_bootstrap_interfaces": { + "attr_type": "NetworkBootstrapInterfacesOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.aio": { + "class_nodes": { + "ManagedNetworkFabricMgmtClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Awaitable[AsyncHttpResponse]", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "access_control_lists": { + "attr_type": "AccessControlListsOperations" + }, + "internet_gateway_rules": { + "attr_type": "InternetGatewayRulesOperations" + }, + "internet_gateways": { + "attr_type": "InternetGatewaysOperations" + }, + "ip_communities": { + "attr_type": "IpCommunitiesOperations" + }, + "ip_extended_communities": { + "attr_type": "IpExtendedCommunitiesOperations" + }, + "ip_prefixes": { + "attr_type": "IpPrefixesOperations" + }, + "l2_isolation_domains": { + "attr_type": "L2IsolationDomainsOperations" + }, + "l3_isolation_domains": { + "attr_type": "L3IsolationDomainsOperations" + }, + "internal_networks": { + "attr_type": "InternalNetworksOperations" + }, + "external_networks": { + "attr_type": "ExternalNetworksOperations" + }, + "neighbor_groups": { + "attr_type": "NeighborGroupsOperations" + }, + "network_device_skus": { + "attr_type": "NetworkDeviceSkusOperations" + }, + "network_devices": { + "attr_type": "NetworkDevicesOperations" + }, + "network_interfaces": { + "attr_type": "NetworkInterfacesOperations" + }, + "network_fabric_controllers": { + "attr_type": "NetworkFabricControllersOperations" + }, + "network_fabric_skus": { + "attr_type": "NetworkFabricSkusOperations" + }, + "network_fabrics": { + "attr_type": "NetworkFabricsOperations" + }, + "network_to_network_interconnects": { + "attr_type": "NetworkToNetworkInterconnectsOperations" + }, + "network_packet_brokers": { + "attr_type": "NetworkPacketBrokersOperations" + }, + "network_racks": { + "attr_type": "NetworkRacksOperations" + }, + "network_tap_rules": { + "attr_type": "NetworkTapRulesOperations" + }, + "network_taps": { + "attr_type": "NetworkTapsOperations" + }, + "route_policies": { + "attr_type": "RoutePoliciesOperations" + }, + "network_monitors": { + "attr_type": "NetworkMonitorsOperations" + }, + "network_bootstrap_devices": { + "attr_type": "NetworkBootstrapDevicesOperations" + }, + "network_bootstrap_interfaces": { + "attr_type": "NetworkBootstrapInterfacesOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.aio.operations": { + "class_nodes": { + "AccessControlListsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlListPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AccessControlList]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AccessControlList", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AccessControlList]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AccessControlList]", + "overloads": [] + } + }, + "properties": {} + }, + "ExternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ExternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ExternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_bgp_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkUpdateBgpAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewayRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGatewayRule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternetGatewayRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGatewayRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGatewayRule]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewaysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGateway", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[InternetGateway]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "InternetGateway", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGateway]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.InternetGateway]", + "overloads": [] + } + }, + "properties": {} + }, + "IpCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpExtendedCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpExtendedCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpExtendedCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpPrefixesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefix", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefixPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[IpPrefix]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "IpPrefix", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpPrefix]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.IpPrefix]", + "overloads": [] + } + }, + "properties": {} + }, + "L2IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L2IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "L2IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L2IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L2IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "L3IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[L3IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "L3IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L3IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.L3IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "NeighborGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroupResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroupPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NeighborGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NeighborGroup", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NeighborGroup]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NeighborGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkBootstrapDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceRebootResponse]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceRefreshConfigurationResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceResyncPasswordsResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapDevicePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpgradeResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateVersion", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapDeviceUpgradeResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkBootstrapDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkBootstrapDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkBootstrapDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkBootstrapInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkBootstrapInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkBootstrapInterface", + "overloads": [] + }, + "list_by_network_bootstrap_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkBootstrapInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDeviceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkDeviceSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDeviceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RebootProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + } + ] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceRefreshConfigurationResponse]", + "overloads": [] + }, + "begin_resync_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricResyncCertificatesResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceResyncPasswordsResponse]", + "overloads": [] + }, + "begin_run_ro_command": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DeviceRoCommand", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + } + ] + }, + "begin_run_rw_command": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceRunRwCommandResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DeviceRwCommand", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceRunRwCommandResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceRunRwCommandResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceRunRwCommandResponse]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevicePatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpgradeResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDeviceUpgradeRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkDeviceUpgradeResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricControllersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricController", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricControllerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricController]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabricController", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricController]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricController]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabricSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabricSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_arm_configuration_diff": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ArmConfigurationDiffOperationResponse]", + "overloads": [] + }, + "begin_commit_batch_status": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitBatchStatusOperationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "CommitBatchStatusRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitBatchStatusOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitBatchStatusOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitBatchStatusOperationResponse]" + } + ] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[CommitConfigurationRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommitConfigurationResponse]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabric", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_deprovision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_discard_commit_batch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiscardCommitBatchOperationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DiscardCommitBatchRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiscardCommitBatchOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiscardCommitBatchOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiscardCommitBatchOperationResponse]" + } + ] + }, + "begin_get_topology": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[GetTopologyResponse]", + "overloads": [] + }, + "begin_lock_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricLockRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + } + ] + }, + "begin_provision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_resync_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricResyncCertificatesResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricResyncPasswordsResponse]", + "overloads": [] + }, + "begin_rotate_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricRotateCertificatesResponse]", + "overloads": [] + }, + "begin_rotate_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabricRotatePasswordsResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkFabric]" + } + ] + }, + "begin_update_infra_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_workload_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpgradeNetworkFabricProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[OperationStatusResult]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ValidateConfigurationProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]" + } + ] + }, + "begin_view_device_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ViewDeviceConfigurationOperationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkFabric", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabric]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkFabric]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkInterface", + "overloads": [] + }, + "list_by_network_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkMonitorsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkMonitor", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkMonitorPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkMonitor]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkMonitor", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkMonitor]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkMonitor]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkPacketBrokersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBroker", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBrokerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkPacketBroker]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkPacketBroker", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkRacksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRack", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRackPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkRack]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkRack", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkRack]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkRack]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRuleResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapRule]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkTapRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTapRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTapRule]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTap", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTapResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkTap]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkTap", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTap]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkTap]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkToNetworkInterconnectsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnect", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnectPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NniUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NniUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NniUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NniUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[NniUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_npb_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "NetworkToNetworkInterconnect", + "overloads": [] + }, + "list_by_network_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.NetworkToNetworkInterconnect]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutePoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicyPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[RoutePolicy]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "RoutePolicy", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RoutePolicy]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.RoutePolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.models": { + "class_nodes": { + "AccessControlList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.AccessControlListProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AccessControlListAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.AclActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "counter_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "remark_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "police_rate_configuration": { + "type": "Optional[_models.PoliceRateConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "counter_name": "Optional", + "remark_comment": "Optional", + "police_rate_configuration": "Optional" + } + }, + "AccessControlListActionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.AclActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "counter_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "remark_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "police_rate_configuration": { + "type": "Optional[_models.PoliceRateConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "counter_name": "Optional", + "remark_comment": "Optional", + "police_rate_configuration": "Optional" + } + }, + "AccessControlListMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ether_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "fragments": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_lengths": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "dscp_markings": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "protocol_neighbors": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.AccessControlListPortCondition]", + "default": null, + "param_type": "keyword_only" + }, + "icmp_configuration": { + "type": "Optional[_models.IcmpConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ether_types": "Optional", + "fragments": "Optional", + "ip_lengths": "Optional", + "ttl_values": "Optional", + "dscp_markings": "Optional", + "protocol_neighbors": "Optional", + "port_condition": "Optional", + "icmp_configuration": "Optional", + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "AccessControlListMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ether_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "fragments": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_lengths": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "dscp_markings": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.AccessControlListPortConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "protocol_neighbors": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "icmp_configuration": { + "type": "Optional[_models.IcmpConfigurationPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ether_types": "Optional", + "fragments": "Optional", + "ip_lengths": "Optional", + "ttl_values": "Optional", + "dscp_markings": "Optional", + "port_condition": "Optional", + "protocol_neighbors": "Optional", + "icmp_configuration": "Optional", + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "AccessControlListMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "Optional[list[_models.AccessControlListMatchCondition]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.AccessControlListAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "ip_address_type": "Optional", + "match_conditions": "Optional", + "actions": "Optional" + } + }, + "AccessControlListMatchConfigurationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "Optional[list[_models.AccessControlListMatchConditionPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.AccessControlListActionPatch]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "ip_address_type": "Optional", + "match_conditions": "Optional", + "actions": "Optional" + } + }, + "AccessControlListPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.AccessControlListPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "AccessControlListPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "type": "Optional[Union[str, _models.ConfigurationType]]", + "default": null, + "param_type": "keyword_only" + }, + "acls_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "type": "Optional[Union[str, _models.CommunityActionTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.AccessControlListMatchConfigurationPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "type": "Optional[list[_models.CommonDynamicMatchConfigurationPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "control_plane_acl_configuration": { + "type": "Optional[list[_models.ControlPlaneAclPatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "acl_type": { + "type": "Optional[Union[str, _models.AclType]]", + "default": null, + "param_type": "keyword_only" + }, + "device_role": { + "type": "Optional[Union[str, _models.DeviceRole]]", + "default": null, + "param_type": "keyword_only" + }, + "global_access_control_list_actions": { + "type": "Optional[_models.GlobalAccessControlListActionPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_type": "Optional", + "acls_url": "Optional", + "default_action": "Optional", + "match_configurations": "Optional", + "dynamic_match_configurations": "Optional", + "control_plane_acl_configuration": "Optional", + "acl_type": "Optional", + "device_role": "Optional", + "global_access_control_list_actions": "Optional", + "annotation": "Optional" + } + }, + "AccessControlListPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "layer4_protocol": { + "type": "Union[str, _models.Layer4Protocol]", + "default": null, + "param_type": "keyword_only" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "flags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "layer4_protocol": { + "type": "Union[str, _models.Layer4Protocol]", + "default": null, + "param_type": "keyword_only" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "flags": "Optional", + "port_type": "Optional", + "layer4_protocol": "Union", + "ports": "Optional", + "port_group_names": "Optional" + } + }, + "AccessControlListPortConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "layer4_protocol": { + "type": "Optional[Union[str, _models.Layer4Protocol]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "flags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "layer4_protocol": { + "type": "Optional[Union[str, _models.Layer4Protocol]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "flags": "Optional", + "port_type": "Optional", + "layer4_protocol": "Optional", + "ports": "Optional", + "port_group_names": "Optional" + } + }, + "AccessControlListProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "type": "Union[str, _models.ConfigurationType]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "acls_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "type": "Optional[Union[str, _models.CommunityActionTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.AccessControlListMatchConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "type": "Optional[list[_models.CommonDynamicMatchConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "acl_type": { + "type": "Optional[Union[str, _models.AclType]]", + "default": null, + "param_type": "keyword_only" + }, + "device_role": { + "type": "Optional[Union[str, _models.DeviceRole]]", + "default": null, + "param_type": "keyword_only" + }, + "global_access_control_list_actions": { + "type": "Optional[_models.GlobalAccessControlListActionProperties]", + "default": null, + "param_type": "keyword_only" + }, + "control_plane_acl_configuration": { + "type": "Optional[list[_models.ControlPlaneAclProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "configuration_type": "Union", + "acls_url": "Optional", + "default_action": "Optional", + "match_configurations": "Optional", + "dynamic_match_configurations": "Optional", + "last_synced_time": "Optional", + "acl_type": "Optional", + "device_role": "Optional", + "global_access_control_list_actions": "Optional", + "last_operation": "Optional", + "network_fabric_ids": "Optional", + "control_plane_acl_configuration": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "AclActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "DROP": "DROP", + "LOG": "LOG", + "POLICE_RATE": "POLICE_RATE", + "REMARK": "REMARK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AclType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTROL_PLANE_ACL": "CONTROL_PLANE_ACL", + "CP": "CP", + "MANAGEMENT": "MANAGEMENT", + "TENANT": "TENANT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Action": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ActionIpCommunityPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "delete": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "set": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "add": "Optional", + "delete": "Optional", + "set": "Optional" + } + }, + "ActionIpCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "delete": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "set": { + "type": "Optional[_models.IpCommunityIdList]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "add": "Optional", + "delete": "Optional", + "set": "Optional" + } + }, + "ActionIpExtendedCommunityPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "delete": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "set": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "add": "Optional", + "delete": "Optional", + "set": "Optional" + } + }, + "ActionIpExtendedCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "add": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "delete": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + }, + "set": { + "type": "Optional[_models.IpExtendedCommunityIdList]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "add": "Optional", + "delete": "Optional", + "set": "Optional" + } + }, + "ActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "INTERNAL": "INTERNAL", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AddressFamilyType": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "I_PV6": "I_PV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "ENABLED_DEGRADED": "ENABLED_DEGRADED", + "MAT": "MAT", + "RMA": "RMA", + "UNDER_MAINTENANCE": "UNDER_MAINTENANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AggregateRoute": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix": null + } + }, + "AggregateRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_routes": { + "type": "Optional[list[_models.AggregateRoute]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.AggregateRoute]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "AggregateRoutePatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_routes": { + "type": "Optional[list[_models.AggregateRoute]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.AggregateRoute]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "AllowASOverride": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLE": "DISABLE", + "ENABLE": "ENABLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AnnotationResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional" + } + }, + "ArmConfigurationDiffOperationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ArmConfigurationDiffResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "ArmConfigurationDiffResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_diff_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_diff_url": "Optional" + } + }, + "AuthorizedTransceiverPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vendor": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "vendor": "Optional", + "key": "Optional" + } + }, + "AuthorizedTransceiverProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vendor": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "vendor": "Optional", + "key": "Optional" + } + }, + "BfdAdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "MAT": "MAT", + "RMA": "RMA", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BfdConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "interval_in_milli_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "multiplier": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "administrative_state": "Optional", + "interval_in_milli_seconds": "Optional", + "multiplier": "Optional" + } + }, + "BfdPatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "interval_in_milli_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "multiplier": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "administrative_state": "Optional", + "interval_in_milli_seconds": "Optional", + "multiplier": "Optional" + } + }, + "BgpAdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BgpConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "peer_asn": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "default_route_originate": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "allow_as": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "allow_as_override": { + "type": "Optional[Union[str, _models.AllowASOverride]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_listen_range_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_listen_range_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_neighbor_address": { + "type": "Optional[list[_models.NeighborAddress]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_neighbor_address": { + "type": "Optional[list[_models.NeighborAddress]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.InternalNetworkBmpProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v4_over_v6_bgp_session": { + "type": "Optional[Union[str, _models.V4OverV6BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "v6_over_v4_bgp_session": { + "type": "Optional[Union[str, _models.V6OverV4BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "default_route_originate": "Optional", + "allow_as": "Optional", + "allow_as_override": "Optional", + "fabric_asn": "Optional", + "peer_asn": null, + "ipv4_listen_range_prefixes": "Optional", + "ipv6_listen_range_prefixes": "Optional", + "ipv4_neighbor_address": "Optional", + "ipv6_neighbor_address": "Optional", + "bmp_configuration": "Optional", + "v4_over_v6_bgp_session": "Optional", + "v6_over_v4_bgp_session": "Optional", + "annotation": "Optional" + } + }, + "BgpPatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "default_route_originate": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "allow_as": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "allow_as_override": { + "type": "Optional[Union[str, _models.AllowASOverride]]", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_listen_range_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_listen_range_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_neighbor_address": { + "type": "Optional[list[_models.NeighborAddressPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_neighbor_address": { + "type": "Optional[list[_models.NeighborAddressPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.InternalNetworkBmpPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v4_over_v6_bgp_session": { + "type": "Optional[Union[str, _models.V4OverV6BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "v6_over_v4_bgp_session": { + "type": "Optional[Union[str, _models.V6OverV4BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "default_route_originate": "Optional", + "allow_as": "Optional", + "allow_as_override": "Optional", + "fabric_asn": "Optional", + "peer_asn": "Optional", + "ipv4_listen_range_prefixes": "Optional", + "ipv6_listen_range_prefixes": "Optional", + "ipv4_neighbor_address": "Optional", + "ipv6_neighbor_address": "Optional", + "bmp_configuration": "Optional", + "v4_over_v6_bgp_session": "Optional", + "v6_over_v4_bgp_session": "Optional", + "annotation": "Optional" + } + }, + "BitRate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rate": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[Union[str, _models.BitRateUnit]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rate": "Optional", + "unit": "Optional" + } + }, + "BitRateUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "BPS": "BPS", + "GBPS": "GBPS", + "KBPS": "KBPS", + "MBPS": "MBPS", + "PPS": "PPS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BmpConfigurationPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "station_configuration_state": { + "type": "Optional[Union[str, _models.StationConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "scope_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_ip": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "station_connection_mode": { + "type": "Optional[Union[str, _models.StationConnectionMode]]", + "default": null, + "param_type": "keyword_only" + }, + "station_connection_properties": { + "type": "Optional[_models.StationConnectionPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "station_network": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "monitored_networks": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy": { + "type": "Optional[Union[str, _models.BmpExportPolicy]]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy_configuration": { + "type": "Optional[_models.BmpExportPolicyPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "monitored_address_families": { + "type": "Optional[list[Union[str, _models.BmpMonitoredAddressFamily]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "station_configuration_state": "Optional", + "scope_resource_id": "Optional", + "station_name": "Optional", + "station_ip": "Optional", + "station_port": "Optional", + "station_connection_mode": "Optional", + "station_connection_properties": "Optional", + "station_network": "Optional", + "monitored_networks": "Optional", + "export_policy": "Optional", + "export_policy_configuration": "Optional", + "monitored_address_families": "Optional" + } + }, + "BmpConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "station_configuration_state": { + "type": "Optional[Union[str, _models.StationConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "scope_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_ip": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "station_port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "station_connection_mode": { + "type": "Optional[Union[str, _models.StationConnectionMode]]", + "default": null, + "param_type": "keyword_only" + }, + "station_connection_properties": { + "type": "Optional[_models.StationConnectionProperties]", + "default": null, + "param_type": "keyword_only" + }, + "station_network": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "monitored_networks": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy": { + "type": "Optional[Union[str, _models.BmpExportPolicy]]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy_configuration": { + "type": "Optional[_models.BmpExportPolicyProperties]", + "default": null, + "param_type": "keyword_only" + }, + "monitored_address_families": { + "type": "Optional[list[Union[str, _models.BmpMonitoredAddressFamily]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "station_configuration_state": "Optional", + "scope_resource_id": "Optional", + "station_name": "Optional", + "station_ip": "Optional", + "station_port": "Optional", + "station_connection_mode": "Optional", + "station_connection_properties": "Optional", + "station_network": "Optional", + "monitored_networks": "Optional", + "export_policy": "Optional", + "export_policy_configuration": "Optional", + "monitored_address_families": "Optional" + } + }, + "BmpConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BmpExportPolicy": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "LOCAL_RIB": "LOCAL_RIB", + "POST_POLICY": "POST_POLICY", + "PRE_POLICY": "PRE_POLICY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BmpExportPolicyPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_policies": { + "type": "Optional[list[Union[str, _models.BmpExportPolicy]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_policies": "Optional" + } + }, + "BmpExportPolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_policies": { + "type": "Optional[list[Union[str, _models.BmpExportPolicy]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_policies": "Optional" + } + }, + "BmpMonitoredAddressFamily": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL": "ALL", + "IPV4_UNICAST": "IPV4_UNICAST", + "IPV6_UNICAST": "IPV6_UNICAST", + "VPN_IPV4": "VPN_IPV4", + "VPN_IPV6": "VPN_IPV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BooleanEnumProperty": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BurstSize": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "size": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[Union[str, _models.BurstSizeUnit]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "size": "Optional", + "unit": "Optional" + } + }, + "BurstSizeUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "BYTES": "BYTES", + "G_BYTES": "G_BYTES", + "K_BYTES": "K_BYTES", + "M_BYTES": "M_BYTES", + "PACKETS": "PACKETS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateArchiveReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "key_vault_uri": "Optional", + "key_vault_id": "Optional", + "certificate_name": "Optional", + "certificate_version": "Optional" + } + }, + "CertificateRotationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "expire_time": "Optional", + "last_rotation_time": "Optional", + "synchronization_status": "Optional", + "certificate_archive_reference": "Optional", + "certificate_type": "Optional" + } + }, + "CommitBatchDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "failed_devices": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "failed_devices": "Optional" + } + }, + "CommitBatchState": { + "type": "Enum", + "methods": {}, + "properties": { + "FAILED": "FAILED", + "PROCESSING": "PROCESSING", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CommitBatchStatusOperationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.CommitBatchStatusResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "CommitBatchStatusRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "commit_batch_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "commit_batch_id": "Optional" + } + }, + "CommitBatchStatusResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "commit_batch_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "commit_batch_state": { + "type": "Optional[Union[str, _models.CommitBatchState]]", + "default": null, + "param_type": "keyword_only" + }, + "commit_batch_details": { + "type": "Optional[_models.CommitBatchDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "commit_batch_id": "Optional", + "commit_batch_state": "Optional", + "commit_batch_details": "Optional" + } + }, + "CommitConfigurationPolicy": { + "type": "Enum", + "methods": {}, + "properties": { + "STAGE_CE_CONFIGURATION": "STAGE_CE_CONFIGURATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CommitConfigurationRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "commit_stage": { + "type": "Optional[Union[str, _models.CommitStage]]", + "default": null, + "param_type": "keyword_only" + }, + "commit_policy": { + "type": "Optional[Union[str, _models.CommitConfigurationPolicy]]", + "default": null, + "param_type": "keyword_only" + }, + "devices": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "commit_stage": "Optional", + "commit_policy": "Optional", + "devices": "Optional" + } + }, + "CommitConfigurationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "CommitStage": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTINUE": "CONTINUE", + "ROLLBACK": "ROLLBACK", + "START": "START", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CommonDynamicMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_groups": { + "type": "Optional[list[_models.IpGroupProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_groups": { + "type": "Optional[list[_models.VlanGroupProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "port_groups": { + "type": "Optional[list[_models.PortGroupProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_groups": "Optional", + "vlan_groups": "Optional", + "port_groups": "Optional" + } + }, + "CommonDynamicMatchConfigurationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_groups": { + "type": "Optional[list[_models.IpGroupPatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_groups": { + "type": "Optional[list[_models.VlanGroupPatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "port_groups": { + "type": "Optional[list[_models.PortGroupPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_groups": "Optional", + "vlan_groups": "Optional", + "port_groups": "Optional" + } + }, + "CommonErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "CommonMatchConditions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "CommonMatchConditionsPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "CommonPostActionResponseForDeviceROCommands": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "output_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "device_configuration_preview": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional", + "output_url": "Optional", + "device_configuration_preview": "Optional" + } + }, + "CommonPostActionResponseForDeviceROCommandsOperationStatusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.CommonPostActionResponseForDeviceROCommands]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "end_time": "Optional", + "id": "Optional", + "name": "Optional", + "properties": "Optional", + "resource_id": "Optional", + "start_time": "Optional", + "status": null, + "error": "Optional" + } + }, + "CommonPostActionResponseForDeviceUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "successful_devices": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "failed_devices": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional", + "successful_devices": "Optional", + "failed_devices": "Optional", + "error": "Optional" + } + }, + "CommonPostActionResponseForStateUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional", + "error": "Optional" + } + }, + "CommunityActionTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "DENY": "DENY", + "PERMIT": "PERMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Condition": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUAL_TO": "EQUAL_TO", + "GREATER_THAN_OR_EQUAL_TO": "GREATER_THAN_OR_EQUAL_TO", + "LESSER_THAN_OR_EQUAL_TO": "LESSER_THAN_OR_EQUAL_TO", + "RANGE": "RANGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConditionalDefaultRouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "ConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPTED": "ACCEPTED", + "DEFERRED_CONTROL": "DEFERRED_CONTROL", + "DEPROVISIONED": "DEPROVISIONED", + "DEPROVISIONING": "DEPROVISIONING", + "ERROR_DEPROVISIONING": "ERROR_DEPROVISIONING", + "ERROR_PROVISIONING": "ERROR_PROVISIONING", + "FAILED": "FAILED", + "PENDING_ADMINISTRATIVE_UPDATE": "PENDING_ADMINISTRATIVE_UPDATE", + "PENDING_COMMIT": "PENDING_COMMIT", + "PROVISIONED": "PROVISIONED", + "PROVISIONING": "PROVISIONING", + "REJECTED": "REJECTED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConfigurationType": { + "type": "Enum", + "methods": {}, + "properties": { + "FILE": "FILE", + "INLINE": "INLINE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ConnectedSubnet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix": null, + "annotation": "Optional" + } + }, + "ConnectedSubnetPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix": null, + "annotation": "Optional" + } + }, + "ConnectedSubnetRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_route_policy": { + "type": "Optional[_models.L3ExportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_route_policy": "Optional" + } + }, + "ConnectedSubnetRoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_route_policy": { + "type": "Optional[_models.L3ExportRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_route_policy": "Optional" + } + }, + "ControlPlanAclIpMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_ip_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "destination_ip_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_ip_prefix": "Optional", + "destination_ip_prefix": "Optional" + } + }, + "ControlPlaneAclAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.ControlPlaneAclActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "remark_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "remark_comment": "Optional" + } + }, + "ControlPlaneAclActionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.ControlPlaneAclActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "remark_comment": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "remark_comment": "Optional" + } + }, + "ControlPlaneAclActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "DENY": "DENY", + "PERMIT": "PERMIT", + "REMARK": "REMARK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ControlPlaneAclIpMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_ip_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "destination_ip_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_ip_prefix": "Optional", + "destination_ip_prefix": "Optional" + } + }, + "ControlPlaneAclMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.ControlPlanAclIpMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_match_condition": { + "type": "Optional[_models.ControlPlaneAclTtlMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.ControlPlaneAclPortMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "flags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "icmp_configuration": { + "type": "Optional[_models.IcmpConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "protocol_types": "Optional", + "ip_condition": "Optional", + "ttl_match_condition": "Optional", + "port_condition": "Optional", + "flags": "Optional", + "icmp_configuration": "Optional" + } + }, + "ControlPlaneAclMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.ControlPlaneAclIpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_match_condition": { + "type": "Optional[_models.ControlPlaneAclTtlMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.ControlPlaneAclPortMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "flags": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "icmp_configuration": { + "type": "Optional[_models.IcmpConfigurationPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "protocol_types": "Optional", + "ip_condition": "Optional", + "ttl_match_condition": "Optional", + "port_condition": "Optional", + "flags": "Optional", + "icmp_configuration": "Optional" + } + }, + "ControlPlaneAclMatchConfigurationPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[_models.ControlPlaneAclMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[_models.ControlPlaneAclActionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "match_condition": "Optional", + "action": "Optional" + } + }, + "ControlPlaneAclMatchConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[_models.ControlPlaneAclMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[_models.ControlPlaneAclAction]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "match_condition": "Optional", + "action": "Optional" + } + }, + "ControlPlaneAclPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.ControlPlaneAclMatchConfigurationPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_address_type": "Optional", + "match_configurations": "Optional" + } + }, + "ControlPlaneAclPortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_match_type": { + "type": "Optional[Union[str, _models.ControlPlaneAclPortMatchType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ports": "Optional", + "port_match_type": "Optional" + } + }, + "ControlPlaneAclPortMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_ports": { + "type": "Optional[_models.ControlPlaneAclPortCondition]", + "default": null, + "param_type": "keyword_only" + }, + "destination_ports": { + "type": "Optional[_models.ControlPlaneAclPortCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_ports": "Optional", + "destination_ports": "Optional" + } + }, + "ControlPlaneAclPortMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_ports": { + "type": "Optional[_models.ControlPlaneAclPortCondition]", + "default": null, + "param_type": "keyword_only" + }, + "destination_ports": { + "type": "Optional[_models.ControlPlaneAclPortCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "source_ports": "Optional", + "destination_ports": "Optional" + } + }, + "ControlPlaneAclPortMatchType": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUALS": "EQUALS", + "GREATER_THAN": "GREATER_THAN", + "LESSER_THAN": "LESSER_THAN", + "NOT_EQUALS": "NOT_EQUALS", + "RANGE": "RANGE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ControlPlaneAclProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.ControlPlaneAclMatchConfigurationProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_address_type": "Optional", + "match_configurations": "Optional" + } + }, + "ControlPlaneAclTtlMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ttl_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_match_type": { + "type": "Optional[Union[str, _models.ControlPlaneAclTtlMatchType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ttl_value": "Optional", + "ttl_match_type": "Optional" + } + }, + "ControlPlaneAclTtlMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ttl_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_match_type": { + "type": "Optional[Union[str, _models.ControlPlaneAclTtlMatchType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ttl_value": "Optional", + "ttl_match_type": "Optional" + } + }, + "ControlPlaneAclTtlMatchType": { + "type": "Enum", + "methods": {}, + "properties": { + "EQUALS": "EQUALS", + "GREATER_THAN": "GREATER_THAN", + "LESSER_THAN": "LESSER_THAN", + "NOT_EQUALS": "NOT_EQUALS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ControllerServices": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_address_spaces": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_address_spaces": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_address_spaces": "Optional", + "ipv6_address_spaces": "Optional" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DestinationPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "destination_type": { + "type": "Optional[Union[str, _models.DestinationType]]", + "default": null, + "param_type": "keyword_only" + }, + "destination_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "isolation_domain_properties": { + "type": "Optional[_models.IsolationDomainPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "destination_tap_rule_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "destination_type": "Optional", + "destination_id": "Optional", + "isolation_domain_properties": "Optional", + "destination_tap_rule_id": "Optional" + } + }, + "DestinationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "destination_type": { + "type": "Union[str, _models.DestinationType]", + "default": null, + "param_type": "keyword_only" + }, + "destination_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "isolation_domain_properties": { + "type": "Optional[_models.IsolationDomainProperties]", + "default": null, + "param_type": "keyword_only" + }, + "destination_tap_rule_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "destination_type": "Union", + "destination_id": null, + "isolation_domain_properties": "Optional", + "destination_tap_rule_id": "Optional" + } + }, + "DestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "DIRECT": "DIRECT", + "ISOLATION_DOMAIN": "ISOLATION_DOMAIN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceAdministrativeState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLE": "DISABLE", + "ENABLE": "ENABLE", + "GRACEFUL_QUARANTINE": "GRACEFUL_QUARANTINE", + "QUARANTINE": "QUARANTINE", + "RESYNC": "RESYNC", + "RMA": "RMA", + "UNDER_MAINTENANCE": "UNDER_MAINTENANCE", + "UNGRACEFUL_QUARANTINE": "UNGRACEFUL_QUARANTINE", + "UNGRACEFUL_RMA": "UNGRACEFUL_RMA", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceInterfaceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "interface_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "supported_connector_types": { + "type": "Optional[list[_models.SupportedConnectorProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "identifier": "Optional", + "interface_type": "Optional", + "supported_connector_types": "Optional" + } + }, + "DeviceRoCommand": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "command": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "command": "Optional" + } + }, + "DeviceRole": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "MANAGEMENT_SWITCH": "MANAGEMENT_SWITCH", + "NPB": "NPB", + "TO_R": "TO_R", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceRwCommand": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "command": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "command_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "command": "Optional", + "command_url": "Optional" + } + }, + "DiscardCommitBatchOperationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DiscardCommitBatchResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "DiscardCommitBatchRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "commit_batch_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "commit_batch_id": "Optional" + } + }, + "DiscardCommitBatchResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "commit_batch_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "commit_batch_id": "Optional" + } + }, + "EnableDisableOnResources": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_ids": "Optional" + } + }, + "EnableDisableState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLE": "DISABLE", + "ENABLE": "ENABLE", + "UNDER_MAINTENANCE": "UNDER_MAINTENANCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Encapsulation": { + "type": "Enum", + "methods": {}, + "properties": { + "GRE": "GRE", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EncapsulationType": { + "type": "Enum", + "methods": {}, + "properties": { + "GT_PV1": "GT_PV1", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "info": "Optional" + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional", + "details": "Optional", + "additional_info": "Optional" + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "ExportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "ExportRoutePolicyInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "ExportRoutePolicyInformationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "ExportRoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "ExpressRouteConnectionInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "express_route_circuit_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "express_route_authorization_key": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "express_route_circuit_id": null, + "express_route_authorization_key": null + } + }, + "ExtendedVlan": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Extension": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_EXTENSION": "NO_EXTENSION", + "NPB": "NPB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExternalNetwork": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ExternalNetworkProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ExternalNetworkBmpPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_state": { + "type": "Optional[Union[str, _models.BmpConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional" + } + }, + "ExternalNetworkBmpProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_state": { + "type": "Optional[Union[str, _models.BmpConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional" + } + }, + "ExternalNetworkPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ExternalNetworkPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "ExternalNetworkPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + }, + "peering_option": { + "type": "Optional[Union[str, _models.PeeringOption]]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_properties": { + "type": "Optional[_models.L3OptionBPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "option_a_properties": { + "type": "Optional[_models.ExternalNetworkPatchPropertiesOptionAProperties]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.ExternalNetworkStaticRoutePatchConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "network_to_network_interconnect_id": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "peering_option": "Optional", + "option_b_properties": "Optional", + "option_a_properties": "Optional", + "static_route_configuration": "Optional" + } + }, + "ExternalNetworkPatchPropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.ExternalNetworkBmpPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v4_over_v6_bgp_session": { + "type": "Optional[Union[str, _models.V4OverV6BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "v6_over_v4_bgp_session": { + "type": "Optional[Union[str, _models.V6OverV4BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv4_prefix_limit": { + "type": "Optional[_models.NativeIpv4PrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv6_prefix_limit": { + "type": "Optional[_models.NativeIpv6PrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional", + "mtu": "Optional", + "vlan_id": "Optional", + "fabric_asn": "Optional", + "peer_asn": "Optional", + "bfd_configuration": "Optional", + "ingress_acl_id": "Optional", + "egress_acl_id": "Optional", + "bmp_configuration": "Optional", + "v4_over_v6_bgp_session": "Optional", + "v6_over_v4_bgp_session": "Optional", + "native_ipv4_prefix_limit": "Optional", + "native_ipv6_prefix_limit": "Optional" + } + }, + "ExternalNetworkProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "peering_option": { + "type": "Union[str, _models.PeeringOption]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_properties": { + "type": "Optional[_models.L3OptionBProperties]", + "default": null, + "param_type": "keyword_only" + }, + "option_a_properties": { + "type": "Optional[_models.ExternalNetworkPropertiesOptionAProperties]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.ExternalNetworkStaticRouteConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "network_to_network_interconnect_id": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "peering_option": "Union", + "option_b_properties": "Optional", + "option_a_properties": "Optional", + "static_route_configuration": "Optional", + "last_operation": "Optional", + "network_fabric_id": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "ExternalNetworkPropertiesOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vlan_id": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.ExternalNetworkBmpProperties]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "v4_over_v6_bgp_session": { + "type": "Optional[Union[str, _models.V4OverV6BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "v6_over_v4_bgp_session": { + "type": "Optional[Union[str, _models.V6OverV4BgpSessionState]]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv4_prefix_limit": { + "type": "Optional[_models.NativeIpv4PrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv6_prefix_limit": { + "type": "Optional[_models.NativeIpv6PrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional", + "mtu": "Optional", + "vlan_id": null, + "fabric_asn": "Optional", + "peer_asn": null, + "bfd_configuration": "Optional", + "ingress_acl_id": "Optional", + "bmp_configuration": "Optional", + "egress_acl_id": "Optional", + "v4_over_v6_bgp_session": "Optional", + "v6_over_v4_bgp_session": "Optional", + "native_ipv4_prefix_limit": "Optional", + "native_ipv6_prefix_limit": "Optional" + } + }, + "ExternalNetworkRouteType": { + "type": "Enum", + "methods": {}, + "properties": { + "OPTION_A": "OPTION_A", + "STATIC": "STATIC", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ExternalNetworkStaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "ExternalNetworkStaticRoutePatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "ExternalNetworkUpdateBfdAdministrativeStateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route_type": { + "type": "Optional[Union[str, _models.ExternalNetworkRouteType]]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "route_type": "Optional", + "administrative_state": "Optional" + } + }, + "ExternalNetworkUpdateBfdAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ExternalNetworkUpdateBfdAdministrativeStateResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "ExternalNetworkUpdateBfdAdministrativeStateResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route_type": { + "type": "Optional[Union[str, _models.ExternalNetworkRouteType]]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "route_type": "Optional", + "administrative_state": "Optional" + } + }, + "FabricLockProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_state": { + "type": "Optional[Union[str, _models.LockConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "lock_type": { + "type": "Optional[Union[str, _models.NetworkFabricLockType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "lock_state": "Optional", + "lock_type": "Optional" + } + }, + "FabricSkuType": { + "type": "Enum", + "methods": {}, + "properties": { + "MULTI_RACK": "MULTI_RACK", + "SINGLE_RACK": "SINGLE_RACK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FeatureFlagProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "feature_flag_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "feature_flag_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "feature_flag_name": "Optional", + "feature_flag_value": "Optional" + } + }, + "GatewayType": { + "type": "Enum", + "methods": {}, + "properties": { + "INFRASTRUCTURE": "INFRASTRUCTURE", + "WORKLOAD": "WORKLOAD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "GetTopologyResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.GetTopologyResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "GetTopologyResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "url": "Optional" + } + }, + "GlobalAccessControlListActionPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_count": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enable_count": "Optional" + } + }, + "GlobalAccessControlListActionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_count": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enable_count": "Optional" + } + }, + "GlobalNetworkTapRuleActionPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_count": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "truncate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enable_count": "Optional", + "truncate": "Optional" + } + }, + "GlobalNetworkTapRuleActionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_count": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "truncate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "enable_count": "Optional", + "truncate": "Optional" + } + }, + "HeaderAddressProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "header_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "address_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "header_name": "Optional", + "address_list": "Optional" + } + }, + "IPAddressType": { + "type": "Enum", + "methods": {}, + "properties": { + "I_PV4": "I_PV4", + "I_PV6": "I_PV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IcmpConfigurationPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "icmp_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "icmp_types": "Optional" + } + }, + "IcmpConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "icmp_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "icmp_types": "Optional" + } + }, + "IdentitySelector": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_type": { + "type": "Union[str, _models.ManagedServiceIdentitySelectorType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "identity_type": "Union", + "user_assigned_identity_resource_id": "Optional" + } + }, + "IdentitySelectorPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "identity_type": { + "type": "Optional[Union[str, _models.ManagedServiceIdentitySelectorType]]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "identity_type": "Optional", + "user_assigned_identity_resource_id": "Optional" + } + }, + "ImportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": "Optional", + "import_ipv6_route_policy_id": "Optional" + } + }, + "ImportRoutePolicyInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": "Optional", + "import_ipv6_route_policy_id": "Optional" + } + }, + "ImportRoutePolicyInformationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": "Optional", + "import_ipv6_route_policy_id": "Optional" + } + }, + "ImportRoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_policy_id": "Optional", + "import_ipv6_route_policy_id": "Optional" + } + }, + "InterfaceType": { + "type": "Enum", + "methods": {}, + "properties": { + "DATA": "DATA", + "MANAGEMENT": "MANAGEMENT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "InternalNetwork": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.InternalNetworkProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "InternalNetworkBmpPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_ip_exclusions": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration_state": { + "type": "Optional[Union[str, _models.BmpConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_ip_exclusions": "Optional", + "bmp_configuration_state": "Optional" + } + }, + "InternalNetworkBmpProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_ip_exclusions": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration_state": { + "type": "Optional[Union[str, _models.BmpConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy_configuration": { + "type": "Optional[_models.BmpExportPolicyProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_ip_exclusions": "Optional", + "bmp_configuration_state": "Optional", + "export_policy_configuration": "Optional" + } + }, + "InternalNetworkPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.InternalNetworkPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "InternalNetworkPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "type": "Optional[list[_models.ConnectedSubnetPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "type": "Optional[list[_models.ConnectedSubnetPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "type": "Optional[Union[str, _models.IsMonitoringEnabled]]", + "default": null, + "param_type": "keyword_only" + }, + "bgp_configuration": { + "type": "Optional[_models.BgpPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.StaticRoutePatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv4_prefix_limit": { + "type": "Optional[_models.NativeIpv4PrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv6_prefix_limit": { + "type": "Optional[_models.NativeIpv6PrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "mtu": "Optional", + "connected_i_pv4_subnets": "Optional", + "connected_i_pv6_subnets": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "ingress_acl_id": "Optional", + "egress_acl_id": "Optional", + "is_monitoring_enabled": "Optional", + "bgp_configuration": "Optional", + "static_route_configuration": "Optional", + "native_ipv4_prefix_limit": "Optional", + "native_ipv6_prefix_limit": "Optional" + } + }, + "InternalNetworkProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vlan_id": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "extension": { + "type": "Optional[Union[str, _models.Extension]]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "connected_i_pv4_subnets": { + "type": "Optional[list[_models.ConnectedSubnet]]", + "default": null, + "param_type": "keyword_only" + }, + "connected_i_pv6_subnets": { + "type": "Optional[list[_models.ConnectedSubnet]]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_monitoring_enabled": { + "type": "Optional[Union[str, _models.IsMonitoringEnabled]]", + "default": null, + "param_type": "keyword_only" + }, + "bgp_configuration": { + "type": "Optional[_models.BgpConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.StaticRouteConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv4_prefix_limit": { + "type": "Optional[_models.NativeIpv4PrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + }, + "native_ipv6_prefix_limit": { + "type": "Optional[_models.NativeIpv6PrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "extension": "Optional", + "mtu": "Optional", + "connected_i_pv4_subnets": "Optional", + "connected_i_pv6_subnets": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "ingress_acl_id": "Optional", + "egress_acl_id": "Optional", + "is_monitoring_enabled": "Optional", + "vlan_id": null, + "bgp_configuration": "Optional", + "static_route_configuration": "Optional", + "native_ipv4_prefix_limit": "Optional", + "native_ipv6_prefix_limit": "Optional", + "last_operation": "Optional", + "network_fabric_id": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "InternalNetworkRouteType": { + "type": "Enum", + "methods": {}, + "properties": { + "BGP": "BGP", + "STATIC": "STATIC", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "InternalNetworkUpdateBfdAdministrativeStateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route_type": { + "type": "Optional[Union[str, _models.InternalNetworkRouteType]]", + "default": null, + "param_type": "keyword_only" + }, + "neighbor_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "route_type": "Optional", + "neighbor_address": "Optional", + "administrative_state": "Optional" + } + }, + "InternalNetworkUpdateBfdAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.InternalNetworkUpdateBfdAdministrativeStateResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "InternalNetworkUpdateBfdAdministrativeStateResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_address_administrative_status": { + "type": "Optional[list[_models.NeighborAddressBfdAdministrativeStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_address_administrative_status": "Optional" + } + }, + "InternalNetworkUpdateBgpAdministrativeStateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BgpAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_address": "Optional", + "administrative_state": "Optional" + } + }, + "InternalNetworkUpdateBgpAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.InternalNetworkUpdateBgpAdministrativeStateResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "InternalNetworkUpdateBgpAdministrativeStateResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_address_administrative_status": { + "type": "Optional[list[_models.NeighborAddressBgpAdministrativeStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_address_administrative_status": "Optional" + } + }, + "InternetGateway": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.InternetGatewayProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "InternetGatewayPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.InternetGatewayPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "InternetGatewayPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "internet_gateway_rule_id": "Optional" + } + }, + "InternetGatewayProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "internet_gateway_rule_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.GatewayType]]", + "default": null, + "param_type": "keyword_only" + }, + "internet_gateway_type": { + "type": "Optional[Union[str, _models.GatewayType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "internet_gateway_rule_id": "Optional", + "ipv4_address": "Optional", + "port": "Optional", + "type": "Optional", + "internet_gateway_type": "Optional", + "network_fabric_controller_id": null, + "last_operation": "Optional", + "provisioning_state": "Optional" + } + }, + "InternetGatewayRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.InternetGatewayRuleProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "InternetGatewayRulePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional" + } + }, + "InternetGatewayRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rule_properties": { + "type": "_models.RuleProperties", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "rule_properties": null, + "last_operation": "Optional", + "provisioning_state": "Optional", + "internet_gateway_ids": "Optional", + "annotation": "Optional" + } + }, + "IpCommunity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.IpCommunityProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IpCommunityIdList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_community_ids": "Optional" + } + }, + "IpCommunityPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.IpCommunityPatchableProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "IpCommunityPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_rules": { + "type": "Optional[list[_models.IpCommunityRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_community_rules": "Optional" + } + }, + "IpCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_rules": { + "type": "list[_models.IpCommunityRule]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "network_fabric_id": "Optional", + "ip_community_rules": "list", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "IpCommunityRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "type": "Union[str, _models.CommunityActionTypes]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "community_members": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "well_known_communities": { + "type": "Optional[list[Union[str, _models.WellKnownCommunities]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "action": "Union", + "sequence_number": null, + "well_known_communities": "Optional", + "community_members": "list" + } + }, + "IpExtendedCommunity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.IpExtendedCommunityProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IpExtendedCommunityIdList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_extended_community_ids": "Optional" + } + }, + "IpExtendedCommunityPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.IpExtendedCommunityPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "IpExtendedCommunityPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_rules": { + "type": "Optional[list[_models.IpExtendedCommunityRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "ip_extended_community_rules": "Optional" + } + }, + "IpExtendedCommunityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_rules": { + "type": "list[_models.IpExtendedCommunityRule]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "ip_extended_community_rules": "list", + "network_fabric_id": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "IpExtendedCommunityRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "type": "Union[str, _models.CommunityActionTypes]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "action": "Union", + "sequence_number": null, + "route_targets": "list" + } + }, + "IpGroupPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "ip_address_type": "Optional", + "ip_prefixes": "Optional" + } + }, + "IpGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "ip_address_type": "Optional", + "ip_prefixes": "Optional" + } + }, + "IpMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.SourceDestinationType]]", + "default": null, + "param_type": "keyword_only" + }, + "prefix_type": { + "type": "Optional[Union[str, _models.PrefixType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefix_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "prefix_type": "Optional", + "ip_prefix_values": "Optional", + "ip_group_names": "Optional" + } + }, + "IpMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.SourceDestinationType]]", + "default": null, + "param_type": "keyword_only" + }, + "prefix_type": { + "type": "Optional[Union[str, _models.PrefixType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefix_values": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "prefix_type": "Optional", + "ip_prefix_values": "Optional", + "ip_group_names": "Optional" + } + }, + "IpPrefix": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.IpPrefixProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IpPrefixPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.IpPrefixPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "IpPrefixPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefix_rules": { + "type": "Optional[list[_models.IpPrefixRule]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "ip_prefix_rules": "Optional" + } + }, + "IpPrefixProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_rules": { + "type": "list[_models.IpPrefixRule]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "network_fabric_id": "Optional", + "ip_prefix_rules": "list", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "IpPrefixRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "type": "Union[str, _models.CommunityActionTypes]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "network_prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "Optional[Union[str, _models.Condition]]", + "default": null, + "param_type": "keyword_only" + }, + "subnet_mask_length": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "action": "Union", + "sequence_number": null, + "network_prefix": null, + "condition": "Optional", + "subnet_mask_length": "Optional" + } + }, + "IsManagementType": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsMonitoringEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsWorkloadManagementNetworkEnabled": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IsolationDomainPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "encapsulation": { + "type": "Optional[Union[str, _models.Encapsulation]]", + "default": null, + "param_type": "keyword_only" + }, + "neighbor_group_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "encapsulation": "Optional", + "neighbor_group_ids": "Optional" + } + }, + "IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "encapsulation": { + "type": "Optional[Union[str, _models.Encapsulation]]", + "default": null, + "param_type": "keyword_only" + }, + "neighbor_group_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "encapsulation": "Optional", + "neighbor_group_ids": "Optional" + } + }, + "L2IsolationDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.L2IsolationDomainProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "L2IsolationDomainPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.L2IsolationDomainPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "L2IsolationDomainPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "extended_vlan": { + "type": "Optional[Union[str, _models.ExtendedVlan]]", + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "mtu": "Optional", + "extended_vlan": "Optional", + "network_to_network_interconnect_id": "Optional", + "annotation": "Optional" + } + }, + "L2IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "extended_vlan": { + "type": "Optional[Union[str, _models.ExtendedVlan]]", + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_fabric_id": null, + "vlan_id": null, + "mtu": "Optional", + "extended_vlan": "Optional", + "network_to_network_interconnect_id": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "annotation": "Optional" + } + }, + "L3ExportRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "L3ExportRoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_ipv4_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_policy_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_ipv4_route_policy_id": "Optional", + "export_ipv6_route_policy_id": "Optional" + } + }, + "L3IsolationDomain": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.L3IsolationDomainProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "L3IsolationDomainPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.L3IsolationDomainPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "L3IsolationDomainPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "redistribute_connected_subnets": { + "type": "Optional[Union[str, _models.RedistributeConnectedSubnets]]", + "default": null, + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "type": "Optional[Union[str, _models.RedistributeStaticRoutes]]", + "default": null, + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "type": "Optional[_models.AggregateRoutePatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "type": "Optional[_models.ConnectedSubnetRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_policy": { + "type": "Optional[_models.StaticRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + }, + "v4_route_prefix_limit": { + "type": "Optional[_models.RoutePrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v6_route_prefix_limit": { + "type": "Optional[_models.RoutePrefixLimitPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy_configuration": { + "type": "Optional[_models.BmpExportPolicyPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "redistribute_connected_subnets": "Optional", + "redistribute_static_routes": "Optional", + "aggregate_route_configuration": "Optional", + "connected_subnet_route_policy": "Optional", + "static_route_policy": "Optional", + "v4_route_prefix_limit": "Optional", + "v6_route_prefix_limit": "Optional", + "export_policy_configuration": "Optional" + } + }, + "L3IsolationDomainProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "redistribute_connected_subnets": { + "type": "Optional[Union[str, _models.RedistributeConnectedSubnets]]", + "default": null, + "param_type": "keyword_only" + }, + "redistribute_static_routes": { + "type": "Optional[Union[str, _models.RedistributeStaticRoutes]]", + "default": null, + "param_type": "keyword_only" + }, + "aggregate_route_configuration": { + "type": "Optional[_models.AggregateRouteConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "connected_subnet_route_policy": { + "type": "Optional[_models.ConnectedSubnetRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_policy": { + "type": "Optional[_models.StaticRoutePolicy]", + "default": null, + "param_type": "keyword_only" + }, + "unique_rd_configuration": { + "type": "Optional[_models.L3UniqueRouteDistinguisherProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v4_route_prefix_limit": { + "type": "Optional[_models.RoutePrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + }, + "v6_route_prefix_limit": { + "type": "Optional[_models.RoutePrefixLimitProperties]", + "default": null, + "param_type": "keyword_only" + }, + "export_policy_configuration": { + "type": "Optional[_models.BmpExportPolicyProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "redistribute_connected_subnets": "Optional", + "redistribute_static_routes": "Optional", + "aggregate_route_configuration": "Optional", + "connected_subnet_route_policy": "Optional", + "network_fabric_id": null, + "static_route_policy": "Optional", + "unique_rd_configuration": "Optional", + "v4_route_prefix_limit": "Optional", + "v6_route_prefix_limit": "Optional", + "last_operation": "Optional", + "export_policy_configuration": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "L3OptionBPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "type": "Optional[_models.RouteTargetPatchInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_route_targets": "Optional", + "export_route_targets": "Optional", + "route_targets": "Optional" + } + }, + "L3OptionBProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "type": "Optional[_models.RouteTargetInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_route_targets": "Optional", + "export_route_targets": "Optional", + "route_targets": "Optional" + } + }, + "L3UniqueRouteDistinguisherProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "unique_rds": "Optional" + } + }, + "LastOperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "details": "Optional" + } + }, + "Layer2Configuration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "interfaces": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "mtu": "Optional", + "interfaces": "Optional" + } + }, + "Layer2ConfigurationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "interfaces": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "mtu": "Optional", + "interfaces": "Optional" + } + }, + "Layer3IpPrefixPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "Layer3IpPrefixProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "Layer4Protocol": { + "type": "Enum", + "methods": {}, + "properties": { + "SCTP": "SCTP", + "TCP": "TCP", + "UDP": "UDP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LockConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagedResourceGroupConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "location": "Optional" + } + }, + "ManagedServiceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.ManagedServiceIdentityType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.UserAssignedIdentity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Union", + "user_assigned_identities": "Optional" + } + }, + "ManagedServiceIdentityPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.ManagedServiceIdentityType]]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.UserAssignedIdentity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "user_assigned_identities": "Optional" + } + }, + "ManagedServiceIdentitySelectorType": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM_ASSIGNED_IDENTITY": "SYSTEM_ASSIGNED_IDENTITY", + "USER_ASSIGNED_IDENTITY": "USER_ASSIGNED_IDENTITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagedServiceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ManagementNetworkConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_vpn_configuration": { + "type": "_models.VpnConfigurationProperties", + "default": null, + "param_type": "keyword_only" + }, + "workload_vpn_configuration": { + "type": "_models.VpnConfigurationProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "infrastructure_vpn_configuration": null, + "workload_vpn_configuration": null + } + }, + "ManagementNetworkPatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_vpn_configuration": { + "type": "Optional[_models.VpnConfigurationPatchableProperties]", + "default": null, + "param_type": "keyword_only" + }, + "workload_vpn_configuration": { + "type": "Optional[_models.VpnConfigurationPatchableProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "infrastructure_vpn_configuration": "Optional", + "workload_vpn_configuration": "Optional" + } + }, + "MicroBfdState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NNIDerivedUniqueRouteDistinguisherConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NativeIpv4PrefixLimitPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix_limits": { + "type": "Optional[list[_models.PrefixLimitPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix_limits": "Optional" + } + }, + "NativeIpv4PrefixLimitProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix_limits": { + "type": "Optional[list[_models.PrefixLimitProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix_limits": "Optional" + } + }, + "NativeIpv6PrefixLimitPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix_limits": { + "type": "Optional[list[_models.PrefixLimitPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix_limits": "Optional" + } + }, + "NativeIpv6PrefixLimitProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix_limits": { + "type": "Optional[list[_models.PrefixLimitProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix_limits": "Optional" + } + }, + "NeighborAddress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "address": "Optional", + "bfd_administrative_state": "Optional", + "bgp_administrative_state": "Optional", + "configuration_state": "Optional" + } + }, + "NeighborAddressBfdAdministrativeStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_address": "Optional", + "administrative_state": "Optional", + "error": "Optional" + } + }, + "NeighborAddressBgpAdministrativeStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BgpAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "neighbor_address": "Optional", + "administrative_state": "Optional", + "error": "Optional" + } + }, + "NeighborAddressPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "address": "Optional", + "bfd_administrative_state": "Optional", + "bgp_administrative_state": "Optional", + "configuration_state": "Optional" + } + }, + "NeighborGroup": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NeighborGroupProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NeighborGroupDestination": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_addresses": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_addresses": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_addresses": "Optional", + "ipv6_addresses": "Optional" + } + }, + "NeighborGroupDestinationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ipv4_addresses": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_addresses": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ipv4_addresses": "Optional", + "ipv6_addresses": "Optional" + } + }, + "NeighborGroupPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NeighborGroupPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NeighborGroupPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "destination": { + "type": "Optional[_models.NeighborGroupDestinationPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "destination": "Optional" + } + }, + "NeighborGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "destination": { + "type": "_models.NeighborGroupDestination", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "destination": null, + "network_tap_ids": "Optional", + "network_tap_rule_ids": "Optional", + "network_fabric_ids": "Optional", + "last_operation": "Optional", + "provisioning_state": "Optional", + "configuration_state": "Optional" + } + }, + "NeighborGroupResyncResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapDevice": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkBootstrapDeviceProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkBootstrapDevicePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkBootstrapDevicePatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkBootstrapDevicePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "host_name": "Optional", + "serial_number": "Optional" + } + }, + "NetworkBootstrapDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "network_device_sku": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "host_name": "Optional", + "serial_number": "Optional", + "version": "Optional", + "network_device_sku": "Optional", + "network_fabric_id": "Optional", + "secondary_management_ipv4_address": "Optional", + "dhcp_v4_server_ip_address": "Optional", + "primary_management_ipv6_address": "Optional", + "secondary_management_ipv6_address": "Optional", + "provisioning_state": "Optional", + "primary_management_ipv4_address": "Optional", + "administrative_state": "Optional", + "configuration_state": "Optional" + } + }, + "NetworkBootstrapDeviceRebootResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapDeviceRefreshConfigurationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapDeviceResyncPasswordsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapDeviceUpdateAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapDeviceUpgradeResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkBootstrapInterface": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.NetworkBootstrapInterfaceProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkBootstrapInterfacePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NetworkBootstrapInterfacePatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "NetworkBootstrapInterfacePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "additional_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "serial_number": "Optional", + "additional_description": "Optional", + "annotation": "Optional" + } + }, + "NetworkBootstrapInterfaceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "additional_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "administrative_state": "Optional", + "configuration_state": "Optional", + "physical_identifier": "Optional", + "connected_to": "Optional", + "interface_type": "Optional", + "description": "Optional", + "additional_description": "Optional", + "ipv4_address": "Optional", + "ipv6_address": "Optional", + "serial_number": "Optional", + "annotation": "Optional" + } + }, + "NetworkDevice": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkDeviceProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkDevicePatchParameters": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkDevicePatchParametersProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkDevicePatchParametersProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_selector": { + "type": "Optional[_models.IdentitySelectorPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "host_name": "Optional", + "serial_number": "Optional", + "identity_selector": "Optional" + } + }, + "NetworkDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "serial_number": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_selector": { + "type": "Optional[_models.IdentitySelector]", + "default": null, + "param_type": "keyword_only" + }, + "network_device_sku": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "host_name": "Optional", + "serial_number": null, + "identity_selector": "Optional", + "version": "Optional", + "network_device_sku": "Optional", + "network_device_role": "Optional", + "network_rack_id": "Optional", + "management_ipv4_address": "Optional", + "management_ipv6_address": "Optional", + "rw_device_config": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "secret_rotation_status": "Optional", + "certificate_rotation_status": "Optional", + "network_fabric_id": "Optional" + } + }, + "NetworkDeviceRefreshConfigurationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkDeviceResyncPasswordsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkDeviceRole": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "MANAGEMENT": "MANAGEMENT", + "NPB": "NPB", + "TO_R": "TO_R", + "TS": "TS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkDeviceRoleName": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "MANAGEMENT": "MANAGEMENT", + "NPB": "NPB", + "TO_R": "TO_R", + "TS": "TS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkDeviceRunRwCommandResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkDeviceRwCommandResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "NetworkDeviceRwCommandResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "output_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional", + "output_url": "Optional" + } + }, + "NetworkDeviceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.NetworkDeviceSkuProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkDeviceSkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "model": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "manufacturer": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "supported_versions": { + "type": "Optional[list[_models.SupportedVersionProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "supported_role_types": { + "type": "Optional[list[Union[str, _models.NetworkDeviceRoleName]]]", + "default": null, + "param_type": "keyword_only" + }, + "interfaces": { + "type": "Optional[list[_models.DeviceInterfaceProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "model": null, + "manufacturer": "Optional", + "supported_versions": "Optional", + "supported_role_types": "Optional", + "interfaces": "Optional", + "provisioning_state": "Optional" + } + }, + "NetworkDeviceUpdateAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkDeviceUpgradeRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "rw_device_config_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "version": null, + "rw_device_config_url": "Optional" + } + }, + "NetworkDeviceUpgradeResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkFabric": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkFabricProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkFabricController": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkFabricControllerProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkFabricControllerPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkFabricControllerPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkFabricControllerPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "infrastructure_express_route_connections": { + "type": "Optional[list[_models.ExpressRouteConnectionInformation]]", + "default": null, + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "type": "Optional[list[_models.ExpressRouteConnectionInformation]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "infrastructure_express_route_connections": "Optional", + "workload_express_route_connections": "Optional" + } + }, + "NetworkFabricControllerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "infrastructure_express_route_connections": { + "type": "Optional[list[_models.ExpressRouteConnectionInformation]]", + "default": null, + "param_type": "keyword_only" + }, + "workload_express_route_connections": { + "type": "Optional[list[_models.ExpressRouteConnectionInformation]]", + "default": null, + "param_type": "keyword_only" + }, + "managed_resource_group_configuration": { + "type": "Optional[_models.ManagedResourceGroupConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "is_workload_management_network_enabled": { + "type": "Optional[Union[str, _models.IsWorkloadManagementNetworkEnabled]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_address_space": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_address_space": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "nfc_sku": { + "type": "Optional[Union[str, _models.NfcSku]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "infrastructure_express_route_connections": "Optional", + "workload_express_route_connections": "Optional", + "infrastructure_services": "Optional", + "workload_services": "Optional", + "managed_resource_group_configuration": "Optional", + "network_fabric_ids": "Optional", + "is_workload_management_network_enabled": "Optional", + "tenant_internet_gateway_ids": "Optional", + "ipv4_address_space": "Optional", + "ipv6_address_space": "Optional", + "nfc_sku": "Optional", + "last_operation": "Optional", + "provisioning_state": "Optional" + } + }, + "NetworkFabricLockAction": { + "type": "Enum", + "methods": {}, + "properties": { + "LOCK": "LOCK", + "UNLOCK": "UNLOCK", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkFabricLockRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_type": { + "type": "Optional[Union[str, _models.NetworkFabricLockType]]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[Union[str, _models.NetworkFabricLockAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "lock_type": "Optional", + "action": "Optional" + } + }, + "NetworkFabricLockType": { + "type": "Enum", + "methods": {}, + "properties": { + "ADMINISTRATIVE": "ADMINISTRATIVE", + "CONFIGURATION": "CONFIGURATION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkFabricPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkFabricPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkFabricPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "rack_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "fabric_asn": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "type": "Optional[_models.TerminalServerPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "management_network_configuration": { + "type": "Optional[_models.ManagementNetworkPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_configuration": { + "type": "Optional[_models.StorageAccountPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "hardware_alert_threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "control_plane_acls": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "trusted_ip_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "unique_rd_configuration": { + "type": "Optional[_models.UniqueRouteDistinguisherPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "qos_configuration": { + "type": "Optional[_models.QosPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "feature_flags": { + "type": "Optional[list[_models.FeatureFlagProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "authorized_transceiver": { + "type": "Optional[_models.AuthorizedTransceiverPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "rack_count": "Optional", + "server_count_per_rack": "Optional", + "ipv4_prefix": "Optional", + "ipv6_prefix": "Optional", + "fabric_asn": "Optional", + "terminal_server_configuration": "Optional", + "management_network_configuration": "Optional", + "storage_account_configuration": "Optional", + "hardware_alert_threshold": "Optional", + "control_plane_acls": "Optional", + "trusted_ip_prefixes": "Optional", + "unique_rd_configuration": "Optional", + "qos_configuration": "Optional", + "feature_flags": "Optional", + "authorized_transceiver": "Optional" + } + }, + "NetworkFabricProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_controller_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "server_count_per_rack": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "fabric_asn": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "terminal_server_configuration": { + "type": "_models.TerminalServerConfiguration", + "default": null, + "param_type": "keyword_only" + }, + "management_network_configuration": { + "type": "_models.ManagementNetworkConfigurationProperties", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "fabric_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_configuration": { + "type": "Optional[_models.StorageAccountConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "rack_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "hardware_alert_threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "control_plane_acls": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "feature_flags": { + "type": "Optional[list[_models.FeatureFlagProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "trusted_ip_prefixes": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "unique_rd_configuration": { + "type": "Optional[_models.UniqueRouteDistinguisherProperties]", + "default": null, + "param_type": "keyword_only" + }, + "storage_array_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "authorized_transceiver": { + "type": "Optional[_models.AuthorizedTransceiverProperties]", + "default": null, + "param_type": "keyword_only" + }, + "qos_configuration": { + "type": "Optional[_models.QosProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_fabric_sku": null, + "fabric_version": "Optional", + "router_ids": "Optional", + "storage_account_configuration": "Optional", + "fabric_locks": "Optional", + "network_fabric_controller_id": null, + "rack_count": "Optional", + "server_count_per_rack": null, + "ipv4_prefix": null, + "ipv6_prefix": "Optional", + "fabric_asn": null, + "terminal_server_configuration": null, + "management_network_configuration": null, + "racks": "Optional", + "l2_isolation_domains": "Optional", + "l3_isolation_domains": "Optional", + "hardware_alert_threshold": "Optional", + "control_plane_acls": "Optional", + "feature_flags": "Optional", + "trusted_ip_prefixes": "Optional", + "unique_rd_configuration": "Optional", + "storage_array_count": "Optional", + "active_commit_batches": "Optional", + "secret_rotation_summary": "Optional", + "last_operation": "Optional", + "authorized_transceiver": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "qos_configuration": "Optional", + "annotation": "Optional" + } + }, + "NetworkFabricResyncCertificatesResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkFabricResyncPasswordsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkFabricRotateCertificatesResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkFabricRotatePasswordsResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkFabricSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.NetworkFabricSkuProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkFabricSkuProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "max_compute_racks": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "maximum_server_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "max_compute_racks": "Optional", + "maximum_server_count": "Optional", + "supported_versions": "Optional", + "details": "Optional", + "provisioning_state": "Optional" + } + }, + "NetworkFabricUpgradeAction": { + "type": "Enum", + "methods": {}, + "properties": { + "COMPLETE": "COMPLETE", + "START": "START", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkInterface": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.NetworkInterfaceProperties", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkInterfacePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NetworkInterfacePatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional" + } + }, + "NetworkInterfacePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "additional_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "additional_description": "Optional", + "annotation": "Optional" + } + }, + "NetworkInterfaceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "additional_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "physical_identifier": "Optional", + "connected_to": "Optional", + "interface_type": "Optional", + "ipv4_address": "Optional", + "ipv6_address": "Optional", + "description": "Optional", + "additional_description": "Optional", + "last_operation": "Optional", + "network_fabric_id": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "configuration_state": "Optional", + "annotation": "Optional" + } + }, + "NetworkMonitor": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkMonitorProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkMonitorPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkMonitorPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "NetworkMonitorPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bmp_configuration": { + "type": "Optional[_models.BmpConfigurationPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bmp_configuration": "Optional" + } + }, + "NetworkMonitorProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.BmpConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bmp_configuration": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "annotation": "Optional" + } + }, + "NetworkPacketBroker": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkPacketBrokerProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkPacketBrokerPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkPacketBrokerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_fabric_id": null, + "network_device_ids": "Optional", + "source_interface_ids": "Optional", + "network_tap_ids": "Optional", + "neighbor_group_ids": "Optional", + "last_operation": "Optional", + "provisioning_state": "Optional", + "configuration_state": "Optional" + } + }, + "NetworkRack": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkRackProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkRackPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional" + } + }, + "NetworkRackProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "network_rack_type": { + "type": "Optional[Union[str, _models.NetworkRackType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_rack_type": "Optional", + "network_fabric_id": null, + "network_devices": "Optional", + "last_operation": "Optional", + "provisioning_state": "Optional", + "configuration_state": "Optional", + "annotation": "Optional" + } + }, + "NetworkRackType": { + "type": "Enum", + "methods": {}, + "properties": { + "AGGREGATE": "AGGREGATE", + "COMBINED": "COMBINED", + "COMPUTE": "COMPUTE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkTap": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkTapProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkTapPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkTapPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkTapPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "polling_type": { + "type": "Optional[Union[str, _models.PollingType]]", + "default": null, + "param_type": "keyword_only" + }, + "destinations": { + "type": "Optional[list[_models.DestinationPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "polling_type": "Optional", + "destinations": "Optional", + "annotation": "Optional" + } + }, + "NetworkTapProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "destinations": { + "type": "list[_models.DestinationProperties]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "polling_type": { + "type": "Optional[Union[str, _models.PollingType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_packet_broker_id": null, + "source_tap_rule_id": "Optional", + "network_fabric_ids": "Optional", + "destinations": "list", + "polling_type": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional", + "annotation": "Optional" + } + }, + "NetworkTapResyncResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkTapRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.NetworkTapRuleProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkTapRuleAction": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.TapRuleActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "truncate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_timestamp_enabled": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "destination_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "truncate": "Optional", + "is_timestamp_enabled": "Optional", + "destination_id": "Optional", + "match_configuration_name": "Optional" + } + }, + "NetworkTapRuleActionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.TapRuleActionType]]", + "default": null, + "param_type": "keyword_only" + }, + "truncate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_timestamp_enabled": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + }, + "destination_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "truncate": "Optional", + "is_timestamp_enabled": "Optional", + "destination_id": "Optional", + "match_configuration_name": "Optional" + } + }, + "NetworkTapRuleMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "encapsulation_type": { + "type": "Optional[Union[str, _models.EncapsulationType]]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.PortCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchCondition]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchCondition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "encapsulation_type": "Optional", + "port_condition": "Optional", + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "NetworkTapRuleMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "encapsulation_type": { + "type": "Optional[Union[str, _models.EncapsulationType]]", + "default": null, + "param_type": "keyword_only" + }, + "port_condition": { + "type": "Optional[_models.PortConditionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "protocol_types": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_match_condition": { + "type": "Optional[_models.VlanMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + }, + "ip_condition": { + "type": "Optional[_models.IpMatchConditionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "encapsulation_type": "Optional", + "port_condition": "Optional", + "protocol_types": "Optional", + "vlan_match_condition": "Optional", + "ip_condition": "Optional" + } + }, + "NetworkTapRuleMatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "Optional[list[_models.NetworkTapRuleMatchCondition]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.NetworkTapRuleAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "ip_address_type": "Optional", + "match_conditions": "Optional", + "actions": "Optional" + } + }, + "NetworkTapRuleMatchConfigurationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "match_configuration_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sequence_number": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address_type": { + "type": "Optional[Union[str, _models.IPAddressType]]", + "default": null, + "param_type": "keyword_only" + }, + "match_conditions": { + "type": "Optional[list[_models.NetworkTapRuleMatchConditionPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "actions": { + "type": "Optional[list[_models.NetworkTapRuleActionPatch]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "match_configuration_name": "Optional", + "sequence_number": "Optional", + "ip_address_type": "Optional", + "match_conditions": "Optional", + "actions": "Optional" + } + }, + "NetworkTapRulePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NetworkTapRulePatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedServiceIdentityPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "identity": "Optional", + "tags": "Optional" + } + }, + "NetworkTapRulePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "configuration_type": { + "type": "Optional[Union[str, _models.ConfigurationType]]", + "default": null, + "param_type": "keyword_only" + }, + "tap_rules_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.NetworkTapRuleMatchConfigurationPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "type": "Optional[list[_models.CommonDynamicMatchConfigurationPatch]]", + "default": null, + "param_type": "keyword_only" + }, + "identity_selector": { + "type": "Optional[_models.IdentitySelectorPatch]", + "default": null, + "param_type": "keyword_only" + }, + "global_network_tap_rule_actions": { + "type": "Optional[_models.GlobalNetworkTapRuleActionPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "configuration_type": "Optional", + "tap_rules_url": "Optional", + "match_configurations": "Optional", + "dynamic_match_configurations": "Optional", + "identity_selector": "Optional", + "global_network_tap_rule_actions": "Optional" + } + }, + "NetworkTapRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_type": { + "type": "Union[str, _models.ConfigurationType]", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "tap_rules_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_selector": { + "type": "Optional[_models.IdentitySelector]", + "default": null, + "param_type": "keyword_only" + }, + "match_configurations": { + "type": "Optional[list[_models.NetworkTapRuleMatchConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "dynamic_match_configurations": { + "type": "Optional[list[_models.CommonDynamicMatchConfiguration]]", + "default": null, + "param_type": "keyword_only" + }, + "polling_interval_in_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "global_network_tap_rule_actions": { + "type": "Optional[_models.GlobalNetworkTapRuleActionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "configuration_type": "Union", + "tap_rules_url": "Optional", + "identity_selector": "Optional", + "match_configurations": "Optional", + "dynamic_match_configurations": "Optional", + "network_tap_id": "Optional", + "network_tap_ids": "Optional", + "polling_interval_in_seconds": "Optional", + "last_synced_time": "Optional", + "global_network_tap_rule_actions": "Optional", + "last_operation": "Optional", + "network_fabric_ids": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "NetworkTapRuleResyncResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "NetworkToNetworkInterconnect": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.NetworkToNetworkInterconnectProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkToNetworkInterconnectPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.NetworkToNetworkInterconnectPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkToNetworkInterconnectPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "layer2_configuration": { + "type": "Optional[_models.Layer2ConfigurationPatch]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_layer3_configuration": { + "type": "Optional[_models.OptionBLayer3ConfigurationPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "npb_static_route_configuration": { + "type": "Optional[_models.NpbStaticRouteConfigurationPatch]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.NniStaticRoutePatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicyInformationPatch]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicyInformationPatch]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "micro_bfd_state": { + "type": "Optional[Union[str, _models.MicroBfdState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "layer2_configuration": "Optional", + "option_b_layer3_configuration": "Optional", + "npb_static_route_configuration": "Optional", + "static_route_configuration": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "egress_acl_id": "Optional", + "ingress_acl_id": "Optional", + "micro_bfd_state": "Optional" + } + }, + "NetworkToNetworkInterconnectProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "use_option_b": { + "type": "Union[str, _models.BooleanEnumProperty]", + "default": null, + "param_type": "keyword_only" + }, + "nni_type": { + "type": "Optional[Union[str, _models.NniType]]", + "default": null, + "param_type": "keyword_only" + }, + "is_management_type": { + "type": "Optional[Union[str, _models.IsManagementType]]", + "default": null, + "param_type": "keyword_only" + }, + "layer2_configuration": { + "type": "Optional[_models.Layer2Configuration]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_layer3_configuration": { + "type": "Optional[_models.OptionBLayer3Configuration]", + "default": null, + "param_type": "keyword_only" + }, + "npb_static_route_configuration": { + "type": "Optional[_models.NpbStaticRouteConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "static_route_configuration": { + "type": "Optional[_models.NniStaticRouteConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "import_route_policy": { + "type": "Optional[_models.ImportRoutePolicyInformation]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_policy": { + "type": "Optional[_models.ExportRoutePolicyInformation]", + "default": null, + "param_type": "keyword_only" + }, + "egress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ingress_acl_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "micro_bfd_state": { + "type": "Optional[Union[str, _models.MicroBfdState]]", + "default": null, + "param_type": "keyword_only" + }, + "conditional_default_route_configuration": { + "type": "Optional[_models.ConditionalDefaultRouteProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "nni_type": "Optional", + "is_management_type": "Optional", + "use_option_b": "Union", + "layer2_configuration": "Optional", + "option_b_layer3_configuration": "Optional", + "npb_static_route_configuration": "Optional", + "static_route_configuration": "Optional", + "import_route_policy": "Optional", + "export_route_policy": "Optional", + "egress_acl_id": "Optional", + "ingress_acl_id": "Optional", + "micro_bfd_state": "Optional", + "conditional_default_route_configuration": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "NfcSku": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "HIGH_PERFORMANCE": "HIGH_PERFORMANCE", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NniBmpPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_state": { + "type": "Optional[Union[str, _models.BmpConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional" + } + }, + "NniBmpProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "configuration_state": { + "type": "Union[str, _models.BmpConfigurationState]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Union" + } + }, + "NniStaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "NniStaticRoutePatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "NniType": { + "type": "Enum", + "methods": {}, + "properties": { + "CE": "CE", + "NPB": "NPB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NniUpdateBfdAdministrativeStateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route_type": { + "type": "Optional[Union[str, _models.RouteType]]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "route_type": "Optional", + "administrative_state": "Optional" + } + }, + "NniUpdateBfdAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.NniUpdateBfdAdministrativeStateResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "NniUpdateBfdAdministrativeStateResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route_type": { + "type": "Optional[Union[str, _models.RouteType]]", + "default": null, + "param_type": "keyword_only" + }, + "administrative_state": { + "type": "Optional[Union[str, _models.BfdAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "route_type": "Optional", + "administrative_state": "Optional" + } + }, + "NpbStaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "NpbStaticRouteConfigurationPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "is_data_action": "Optional", + "display": "Optional", + "origin": "Optional", + "action_type": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "resource": "Optional", + "operation": "Optional", + "description": "Optional" + } + }, + "OperationStatusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional" + } + }, + "OptionBLayer3Configuration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "peer_asn": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "pe_loopback_ip_address": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.NniBmpProperties]", + "default": null, + "param_type": "keyword_only" + }, + "prefix_limits": { + "type": "Optional[list[_models.OptionBLayer3PrefixLimitProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "peer_asn": null, + "vlan_id": null, + "fabric_asn": "Optional", + "pe_loopback_ip_address": "Optional", + "bmp_configuration": "Optional", + "prefix_limits": "Optional", + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "OptionBLayer3ConfigurationPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "pe_loopback_ip_address": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "bmp_configuration": { + "type": "Optional[_models.NniBmpPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "prefix_limits": { + "type": "Optional[list[_models.OptionBLayer3PrefixLimitPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "peer_asn": "Optional", + "vlan_id": "Optional", + "fabric_asn": "Optional", + "pe_loopback_ip_address": "Optional", + "bmp_configuration": "Optional", + "prefix_limits": "Optional", + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "OptionBLayer3PrefixLimitPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "maximum_routes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "maximum_routes": "Optional" + } + }, + "OptionBLayer3PrefixLimitProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "maximum_routes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "maximum_routes": "Optional" + } + }, + "Origin": { + "type": "Enum", + "methods": {}, + "properties": { + "SYSTEM": "SYSTEM", + "USER": "USER", + "USER_SYSTEM": "USER_SYSTEM", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PeeringOption": { + "type": "Enum", + "methods": {}, + "properties": { + "OPTION_A": "OPTION_A", + "OPTION_B": "OPTION_B", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PoliceRateConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bit_rate": { + "type": "Optional[_models.BitRate]", + "default": null, + "param_type": "keyword_only" + }, + "burst_size": { + "type": "Optional[_models.BurstSize]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bit_rate": "Optional", + "burst_size": "Optional" + } + }, + "PollingType": { + "type": "Enum", + "methods": {}, + "properties": { + "PULL": "PULL", + "PUSH": "PUSH", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PortCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "layer4_protocol": { + "type": "Union[str, _models.Layer4Protocol]", + "default": null, + "param_type": "keyword_only" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "port_type": "Optional", + "layer4_protocol": "Union", + "ports": "Optional", + "port_group_names": "Optional" + } + }, + "PortConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "port_type": { + "type": "Optional[Union[str, _models.PortType]]", + "default": null, + "param_type": "keyword_only" + }, + "layer4_protocol": { + "type": "Optional[Union[str, _models.Layer4Protocol]]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "port_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "port_type": "Optional", + "layer4_protocol": "Optional", + "ports": "Optional", + "port_group_names": "Optional" + } + }, + "PortGroupPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "ports": "Optional" + } + }, + "PortGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "ports": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "ports": "Optional" + } + }, + "PortType": { + "type": "Enum", + "methods": {}, + "properties": { + "BIDIRECTIONAL": "BIDIRECTIONAL", + "DESTINATION_PORT": "DESTINATION_PORT", + "SOURCE_PORT": "SOURCE_PORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrefixLimitPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "maximum_routes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "idle_time_expiry": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "maximum_routes": "Optional", + "threshold": "Optional", + "idle_time_expiry": "Optional" + } + }, + "PrefixLimitProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "maximum_routes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "idle_time_expiry": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "maximum_routes": "Optional", + "threshold": "Optional", + "idle_time_expiry": "Optional" + } + }, + "PrefixType": { + "type": "Enum", + "methods": {}, + "properties": { + "LONGEST_PREFIX": "LONGEST_PREFIX", + "PREFIX": "PREFIX", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPTED": "ACCEPTED", + "CANCELED": "CANCELED", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ProxyResourceBase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "QosConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "QosPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "qos_configuration_state": { + "type": "Optional[Union[str, _models.QosConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "qos_configuration_state": "Optional" + } + }, + "QosProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "qos_configuration_state": { + "type": "Optional[Union[str, _models.QosConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "qos_configuration_state": "Optional" + } + }, + "RebootProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "reboot_type": { + "type": "Optional[Union[str, _models.RebootType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "reboot_type": "Optional" + } + }, + "RebootType": { + "type": "Enum", + "methods": {}, + "properties": { + "GRACEFUL_REBOOT_WITHOUT_ZTP": "GRACEFUL_REBOOT_WITHOUT_ZTP", + "GRACEFUL_REBOOT_WITH_ZTP": "GRACEFUL_REBOOT_WITH_ZTP", + "UNGRACEFUL_REBOOT_WITHOUT_ZTP": "UNGRACEFUL_REBOOT_WITHOUT_ZTP", + "UNGRACEFUL_REBOOT_WITH_ZTP": "UNGRACEFUL_REBOOT_WITH_ZTP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RedistributeConnectedSubnets": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RedistributeStaticRoutes": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "_models.RoutePolicyProperties", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": null, + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RoutePolicyActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONTINUE": "CONTINUE", + "DENY": "DENY", + "PERMIT": "PERMIT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutePolicyConditionType": { + "type": "Enum", + "methods": {}, + "properties": { + "AND": "AND", + "OR": "OR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.RoutePolicyPatchableProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "tags": "Optional" + } + }, + "RoutePolicyPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "default_action": { + "type": "Optional[Union[str, _models.CommunityActionTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "statements": { + "type": "Optional[list[_models.RoutePolicyStatementPatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "default_action": "Optional", + "statements": "Optional" + } + }, + "RoutePolicyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "statements": { + "type": "list[_models.RoutePolicyStatementProperties]", + "default": null, + "param_type": "keyword_only" + }, + "network_fabric_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "type": "Optional[Union[str, _models.CommunityActionTypes]]", + "default": null, + "param_type": "keyword_only" + }, + "address_family_type": { + "type": "Optional[Union[str, _models.AddressFamilyType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "annotation": "Optional", + "default_action": "Optional", + "statements": "list", + "network_fabric_id": null, + "address_family_type": "Optional", + "last_operation": "Optional", + "configuration_state": "Optional", + "provisioning_state": "Optional", + "administrative_state": "Optional" + } + }, + "RoutePolicyStatementPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sequence_number": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "_models.StatementConditionPatchProperties", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "_models.StatementActionPatchProperties", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sequence_number": null, + "condition": null, + "action": null, + "annotation": "Optional" + } + }, + "RoutePolicyStatementProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sequence_number": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "_models.StatementConditionProperties", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "_models.StatementActionProperties", + "default": null, + "param_type": "keyword_only" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "annotation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "sequence_number": null, + "condition": null, + "action": null, + "annotation": "Optional" + } + }, + "RoutePrefixLimitPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "hard_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "hard_limit": "Optional", + "threshold": "Optional" + } + }, + "RoutePrefixLimitProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "hard_limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "threshold": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "hard_limit": "Optional", + "threshold": "Optional" + } + }, + "RouteTargetInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv4_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_targets": "Optional", + "import_ipv6_route_targets": "Optional", + "export_ipv4_route_targets": "Optional", + "export_ipv6_route_targets": "Optional" + } + }, + "RouteTargetPatchInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_ipv4_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "import_ipv6_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv4_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_ipv6_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_ipv4_route_targets": "Optional", + "import_ipv6_route_targets": "Optional", + "export_ipv4_route_targets": "Optional", + "export_ipv6_route_targets": "Optional" + } + }, + "RouteType": { + "type": "Enum", + "methods": {}, + "properties": { + "OPTION_A": "OPTION_A", + "STATIC": "STATIC", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleCondition": { + "type": "Enum", + "methods": {}, + "properties": { + "AND": "AND", + "OR": "OR", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action": { + "type": "Union[str, _models.Action]", + "default": null, + "param_type": "keyword_only" + }, + "address_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "Optional[Union[str, _models.RuleCondition]]", + "default": null, + "param_type": "keyword_only" + }, + "destination_address_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "source_address_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "header_address_list": { + "type": "Optional[list[_models.HeaderAddressProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "action": "Union", + "address_list": "Optional", + "condition": "Optional", + "destination_address_list": "Optional", + "source_address_list": "Optional", + "header_address_list": "Optional" + } + }, + "SecretArchiveReference": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "key_vault_uri": "Optional", + "key_vault_id": "Optional", + "secret_name": "Optional", + "secret_version": "Optional" + } + }, + "SecretRotationStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "last_rotation_time": "Optional", + "synchronization_status": "Optional", + "secret_archive_reference": "Optional", + "secret_type": "Optional" + } + }, + "SecretRotationSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "active_password_set_count": "Optional" + } + }, + "SourceDestinationType": { + "type": "Enum", + "methods": {}, + "properties": { + "BIDIRECTIONAL": "BIDIRECTIONAL", + "DESTINATION_IP": "DESTINATION_IP", + "SOURCE_IP": "SOURCE_IP", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "StatementActionPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action_type": { + "type": "Union[str, _models.RoutePolicyActionType]", + "default": null, + "param_type": "keyword_only" + }, + "local_preference": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_community_properties": { + "type": "Optional[_models.ActionIpCommunityPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_properties": { + "type": "Optional[_models.ActionIpExtendedCommunityPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "local_preference": "Optional", + "action_type": "Union", + "ip_community_properties": "Optional", + "ip_extended_community_properties": "Optional" + } + }, + "StatementActionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "action_type": { + "type": "Union[str, _models.RoutePolicyActionType]", + "default": null, + "param_type": "keyword_only" + }, + "local_preference": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_community_properties": { + "type": "Optional[_models.ActionIpCommunityProperties]", + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_properties": { + "type": "Optional[_models.ActionIpExtendedCommunityProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "local_preference": "Optional", + "action_type": "Union", + "ip_community_properties": "Optional", + "ip_extended_community_properties": "Optional" + } + }, + "StatementConditionPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.RoutePolicyConditionType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefix_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_community_ids": "Optional", + "ip_extended_community_ids": "Optional", + "type": "Optional", + "ip_prefix_id": "Optional" + } + }, + "StatementConditionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_extended_community_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[Union[str, _models.RoutePolicyConditionType]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_prefix_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "ip_community_ids": "Optional", + "ip_extended_community_ids": "Optional", + "type": "Optional", + "ip_prefix_id": "Optional" + } + }, + "StaticRouteConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "extension": { + "type": "Optional[Union[str, _models.Extension]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional", + "extension": "Optional" + } + }, + "StaticRoutePatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "ipv4_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "ipv6_routes": { + "type": "Optional[list[_models.StaticRoutePatchProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "bfd_configuration": "Optional", + "ipv4_routes": "Optional", + "ipv6_routes": "Optional" + } + }, + "StaticRoutePatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "next_hop": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix": null, + "next_hop": "list" + } + }, + "StaticRoutePolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_route_policy": { + "type": "Optional[_models.L3ExportRoutePolicy]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_route_policy": "Optional" + } + }, + "StaticRoutePolicyPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_route_policy": { + "type": "Optional[_models.L3ExportRoutePolicyPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "export_route_policy": "Optional" + } + }, + "StaticRouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "next_hop": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "prefix": null, + "next_hop": "list" + } + }, + "StationConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "StationConnectionMode": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "PASSIVE": "PASSIVE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "StationConnectionPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "keepalive_idle_time": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "probe_interval": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "probe_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "keepalive_idle_time": "Optional", + "probe_interval": "Optional", + "probe_count": "Optional" + } + }, + "StationConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "keepalive_idle_time": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "probe_interval": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "probe_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "keepalive_idle_time": "Optional", + "probe_interval": "Optional", + "probe_count": "Optional" + } + }, + "StorageAccountConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_identity": { + "type": "Optional[_models.IdentitySelector]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "storage_account_id": "Optional", + "storage_account_identity": "Optional" + } + }, + "StorageAccountPatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_identity": { + "type": "Optional[_models.IdentitySelectorPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "storage_account_id": "Optional", + "storage_account_identity": "Optional" + } + }, + "SupportedConnectorProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "connector_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "max_speed_in_mbps": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "connector_type": "Optional", + "max_speed_in_mbps": "Optional" + } + }, + "SupportedVersionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "vendor_os_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "vendor_firmware_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_default": { + "type": "Optional[Union[str, _models.BooleanEnumProperty]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "version": "Optional", + "vendor_os_version": "Optional", + "vendor_firmware_version": "Optional", + "is_default": "Optional" + } + }, + "SynchronizationStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "IN_SYNC": "IN_SYNC", + "OUT_OF_SYNC": "OUT_OF_SYNC", + "SYNCHRONIZING": "SYNCHRONIZING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TagsUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional" + } + }, + "TapRuleActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "COUNT": "COUNT", + "DROP": "DROP", + "GOTO": "GOTO", + "LOG": "LOG", + "MIRROR": "MIRROR", + "REDIRECT": "REDIRECT", + "REPLICATE": "REPLICATE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TerminalServerConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "username": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "username": null, + "password": null, + "serial_number": "Optional", + "primary_ipv4_prefix": null, + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": null, + "secondary_ipv6_prefix": "Optional", + "network_device_id": "Optional", + "secret_rotation_status": "Optional" + } + }, + "TerminalServerPatchConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "username": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "username": "Optional", + "password": "Optional", + "serial_number": "Optional", + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "UniqueRouteDistinguisherConfigurationState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "UniqueRouteDistinguisherPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "unique_rd_configuration_state": { + "type": "Optional[Union[str, _models.UniqueRouteDistinguisherConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "nni_derived_unique_rd_configuration_state": { + "type": "Optional[Union[str, _models.NNIDerivedUniqueRouteDistinguisherConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "unique_rd_configuration_state": "Optional", + "nni_derived_unique_rd_configuration_state": "Optional" + } + }, + "UniqueRouteDistinguisherProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "unique_rd_configuration_state": { + "type": "Optional[Union[str, _models.UniqueRouteDistinguisherConfigurationState]]", + "default": null, + "param_type": "keyword_only" + }, + "nni_derived_unique_rd_configuration_state": { + "type": "Optional[Union[str, _models.NNIDerivedUniqueRouteDistinguisherConfigurationState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "unique_rd_configuration_state": "Optional", + "unique_rds": "Optional", + "nni_derived_unique_rd_configuration_state": "Optional" + } + }, + "UpdateAdministrativeState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.EnableDisableState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "state": "Optional", + "resource_ids": "Optional" + } + }, + "UpdateAdministrativeStateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.UpdateAdministrativeStateResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "UpdateAdministrativeStateResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "successful_resources": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "failed_resources": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "successful_resources": "Optional", + "failed_resources": "Optional" + } + }, + "UpdateDeviceAdministrativeState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.DeviceAdministrativeState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_ids": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "state": "Optional", + "resource_ids": "Optional" + } + }, + "UpdateVersion": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "version": "Optional" + } + }, + "UpgradeNetworkFabricProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[Union[str, _models.NetworkFabricUpgradeAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "action": "Optional", + "version": "Optional" + } + }, + "UserAssignedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "V4OverV6BgpSessionState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "V6OverV4BgpSessionState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ValidateAction": { + "type": "Enum", + "methods": {}, + "properties": { + "CABLING": "CABLING", + "CONFIGURATION": "CONFIGURATION", + "CONNECTIVITY": "CONNECTIVITY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ValidateConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "validate_action": { + "type": "Optional[Union[str, _models.ValidateAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "validate_action": "Optional" + } + }, + "ValidateConfigurationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "configuration_state": "Optional", + "url": "Optional", + "error": "Optional" + } + }, + "ViewDeviceConfigurationOperationResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "operations": { + "type": "Optional[list[_models.OperationStatusResult]]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ViewDeviceConfigurationResponseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": null, + "percent_complete": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "operations": "Optional", + "error": "Optional", + "resource_id": "Optional", + "properties": "Optional" + } + }, + "ViewDeviceConfigurationResponseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "device_configuration_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "device_configuration_url": "Optional" + } + }, + "VlanGroupPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "vlans": "Optional" + } + }, + "VlanGroupProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "vlans": "Optional" + } + }, + "VlanMatchCondition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "inner_vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "vlans": "Optional", + "inner_vlans": "Optional", + "vlan_group_names": "Optional" + } + }, + "VlanMatchConditionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "inner_vlans": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_group_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "vlans": "Optional", + "inner_vlans": "Optional", + "vlan_group_names": "Optional" + } + }, + "VpnConfigurationPatchableProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "peering_option": { + "type": "Optional[Union[str, _models.PeeringOption]]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_properties": { + "type": "Optional[_models.VpnOptionBPatchProperties]", + "default": null, + "param_type": "keyword_only" + }, + "option_a_properties": { + "type": "Optional[_models.VpnOptionAPatchProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": "Optional", + "peering_option": "Optional", + "option_b_properties": "Optional", + "option_a_properties": "Optional" + } + }, + "VpnConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "peering_option": { + "type": "Union[str, _models.PeeringOption]", + "default": null, + "param_type": "keyword_only" + }, + "network_to_network_interconnect_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "option_b_properties": { + "type": "Optional[_models.VpnOptionBProperties]", + "default": null, + "param_type": "keyword_only" + }, + "option_a_properties": { + "type": "Optional[_models.VpnOptionAProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "network_to_network_interconnect_id": "Optional", + "administrative_state": "Optional", + "peering_option": "Union", + "option_b_properties": "Optional", + "option_a_properties": "Optional" + } + }, + "VpnOptionAPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "vlan_id": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdPatchConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "mtu": "Optional", + "vlan_id": "Optional", + "peer_asn": "Optional", + "bfd_configuration": "Optional", + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "VpnOptionAProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vlan_id": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "peer_asn": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mtu": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "bfd_configuration": { + "type": "Optional[_models.BfdConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "primary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "primary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv4_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_ipv6_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "mtu": "Optional", + "vlan_id": null, + "peer_asn": null, + "bfd_configuration": "Optional", + "primary_ipv4_prefix": "Optional", + "primary_ipv6_prefix": "Optional", + "secondary_ipv4_prefix": "Optional", + "secondary_ipv6_prefix": "Optional" + } + }, + "VpnOptionBPatchProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "type": "Optional[_models.RouteTargetPatchInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_route_targets": "Optional", + "export_route_targets": "Optional", + "route_targets": "Optional" + } + }, + "VpnOptionBProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "import_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "export_route_targets": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "route_targets": { + "type": "Optional[_models.RouteTargetInformation]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "import_route_targets": "Optional", + "export_route_targets": "Optional", + "route_targets": "Optional" + } + }, + "WellKnownCommunities": { + "type": "Enum", + "methods": {}, + "properties": { + "G_SHUT": "G_SHUT", + "INTERNET": "INTERNET", + "LOCAL_AS": "LOCAL_AS", + "NO_ADVERTISE": "NO_ADVERTISE", + "NO_EXPORT": "NO_EXPORT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.managednetworkfabric.operations": { + "class_nodes": { + "AccessControlListsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "AccessControlListPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AccessControlList]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "access_control_list_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AccessControlList", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AccessControlList]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AccessControlList]", + "overloads": [] + } + }, + "properties": {} + }, + "ExternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ExternalNetworkUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ExternalNetworkUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "external_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ExternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ExternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternalNetworksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetwork", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetwork]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_bgp_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternalNetworkUpdateBgpAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]" + } + ] + }, + "begin_update_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internal_network_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternalNetwork", + "overloads": [] + }, + "list_by_l3_isolation_domain": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternalNetwork]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewayRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGatewayRule]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternetGatewayRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGatewayRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGatewayRule]", + "overloads": [] + } + }, + "properties": {} + }, + "InternetGatewaysOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGateway", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "InternetGatewayPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[InternetGateway]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "internet_gateway_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "InternetGateway", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGateway]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.InternetGateway]", + "overloads": [] + } + }, + "properties": {} + }, + "IpCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpExtendedCommunitiesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunity", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpExtendedCommunityPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpExtendedCommunity]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_extended_community_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpExtendedCommunity", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpExtendedCommunity]", + "overloads": [] + } + }, + "properties": {} + }, + "IpPrefixesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefix", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IpPrefixPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[IpPrefix]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_prefix_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "IpPrefix", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpPrefix]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.IpPrefix]", + "overloads": [] + } + }, + "properties": {} + }, + "L2IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L2IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L2IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l2_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "L2IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L2IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L2IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "L3IsolationDomainsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomain", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "L3IsolationDomainPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[L3IsolationDomain]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "l3_isolation_domain_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "L3IsolationDomain", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L3IsolationDomain]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.L3IsolationDomain]", + "overloads": [] + } + }, + "properties": {} + }, + "NeighborGroupsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroup", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroupResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NeighborGroupPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NeighborGroup]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "neighbor_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NeighborGroup", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NeighborGroup]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NeighborGroup]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkBootstrapDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceRebootResponse]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceRefreshConfigurationResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceResyncPasswordsResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapDevicePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpgradeResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateVersion", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapDeviceUpgradeResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkBootstrapDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkBootstrapDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkBootstrapDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkBootstrapInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkBootstrapInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkBootstrapInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkBootstrapInterface", + "overloads": [] + }, + "list_by_network_bootstrap_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_bootstrap_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkBootstrapInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDeviceSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkDeviceSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDeviceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkDevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_reboot": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RebootProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + } + ] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceRefreshConfigurationResponse]", + "overloads": [] + }, + "begin_resync_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricResyncCertificatesResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceResyncPasswordsResponse]", + "overloads": [] + }, + "begin_run_ro_command": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DeviceRoCommand", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceROCommandsOperationStatusResult]" + } + ] + }, + "begin_run_rw_command": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceRunRwCommandResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DeviceRwCommand", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceRunRwCommandResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceRunRwCommandResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceRunRwCommandResponse]" + } + ] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDevicePatchParameters", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDevice]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateDeviceAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpgradeResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkDeviceUpgradeRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpgradeResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkDeviceUpgradeResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkDevice", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDevice]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkDevice]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricControllersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricController", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricControllerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricController]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_controller_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabricController", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricController]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricController]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_sku_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabricSku", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabricSku]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkFabricsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_arm_configuration_diff": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ArmConfigurationDiffOperationResponse]", + "overloads": [] + }, + "begin_commit_batch_status": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitBatchStatusOperationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "CommitBatchStatusRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitBatchStatusOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitBatchStatusOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitBatchStatusOperationResponse]" + } + ] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[CommitConfigurationRequest]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[JSON]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[IO[bytes]]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommitConfigurationResponse]" + } + ] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabric", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_deprovision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_discard_commit_batch": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DiscardCommitBatchOperationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "DiscardCommitBatchRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DiscardCommitBatchOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DiscardCommitBatchOperationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DiscardCommitBatchOperationResponse]" + } + ] + }, + "begin_get_topology": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[GetTopologyResponse]", + "overloads": [] + }, + "begin_lock_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricLockRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + } + ] + }, + "begin_provision": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_refresh_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [] + }, + "begin_resync_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricResyncCertificatesResponse]", + "overloads": [] + }, + "begin_resync_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricResyncPasswordsResponse]", + "overloads": [] + }, + "begin_rotate_certificates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricRotateCertificatesResponse]", + "overloads": [] + }, + "begin_rotate_passwords": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabricRotatePasswordsResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkFabricPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkFabric]" + } + ] + }, + "begin_update_infra_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_workload_management_bfd_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_upgrade": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpgradeNetworkFabricProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[OperationStatusResult]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "ValidateConfigurationProperties", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]" + } + ] + }, + "begin_view_device_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ViewDeviceConfigurationOperationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkFabric", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabric]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkFabric]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkInterfacesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterface", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkInterfacePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkInterface]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_interface_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkInterface", + "overloads": [] + }, + "list_by_network_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkInterface]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkMonitorsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkMonitor", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkMonitorPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkMonitor]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForDeviceUpdate]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_monitor_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkMonitor", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkMonitor]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkMonitor]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkPacketBrokersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBroker", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkPacketBrokerPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkPacketBroker]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_packet_broker_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkPacketBroker", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkPacketBroker]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkRacksOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRack", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkRackPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkRack]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_rack_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkRack", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkRack]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkRack]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapRulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRuleResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapRulePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapRule]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_rule_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkTapRule", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTapRule]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTapRule]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkTapsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTap", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_resync": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTapResyncResponse]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkTapPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkTap]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_tap_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkTap", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTap]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkTap]", + "overloads": [] + } + }, + "properties": {} + }, + "NetworkToNetworkInterconnectsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnect", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NetworkToNetworkInterconnectPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NetworkToNetworkInterconnect]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_update_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[NniUpdateBfdAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "NniUpdateBfdAdministrativeStateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NniUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NniUpdateBfdAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[NniUpdateBfdAdministrativeStateResponse]" + } + ] + }, + "begin_update_npb_static_route_bfd_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_to_network_interconnect_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "NetworkToNetworkInterconnect", + "overloads": [] + }, + "list_by_network_fabric": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "network_fabric_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.NetworkToNetworkInterconnect]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "RoutePoliciesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_commit_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[CommonPostActionResponseForStateUpdate]", + "overloads": [] + }, + "begin_create": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicy", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "RoutePolicyPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[RoutePolicy]" + } + ] + }, + "begin_update_administrative_state": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "UpdateAdministrativeState", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[UpdateAdministrativeStateResponse]" + } + ] + }, + "begin_validate_configuration": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ValidateConfigurationResponse]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route_policy_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "RoutePolicy", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RoutePolicy]", + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.RoutePolicy]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create.py index c0fc69bfb931..f904bc098c20 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_create_maximum_set_gen.py + python access_control_lists_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.begin_create( @@ -37,10 +36,12 @@ def main(): body={ "location": "eastUs", "properties": { + "aclType": "ControlPlaneTrafficPolicy", "aclsUrl": "https://ACL-Storage-URL", "annotation": "annotation", "configurationType": "File", "defaultAction": "Permit", + "deviceRole": "CE", "dynamicMatchConfigurations": [ { "ipGroups": [ @@ -50,15 +51,27 @@ def main(): "vlanGroups": [{"name": "example-vlanGroup", "vlans": ["20-30"]}], } ], + "globalAccessControlListActions": {"enableCount": "True"}, "matchConfigurations": [ { - "actions": [{"counterName": "example-counter", "type": "Count"}], + "actions": [ + { + "counterName": "example-counter", + "policeRateConfiguration": { + "bitRate": {"rate": 15, "unit": "bps"}, + "burstSize": {"size": 2, "unit": "Bytes"}, + }, + "remarkComment": "example-remark", + "type": "Count", + } + ], "ipAddressType": "IPv4", "matchConditions": [ { "dscpMarkings": ["32"], "etherTypes": ["0x1"], "fragments": ["0xff00-0xffff"], + "icmpConfiguration": {"icmpTypes": ["echo"]}, "ipCondition": { "ipGroupNames": ["example-ipGroup"], "ipPrefixValues": ["10.20.20.20/12"], @@ -73,6 +86,7 @@ def main(): "portType": "SourcePort", "ports": ["1-20"], }, + "protocolNeighbors": ["example-neighbor"], "protocolTypes": ["TCP"], "ttlValues": ["23"], "vlanMatchCondition": { @@ -87,12 +101,12 @@ def main(): } ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"keyID": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_control_plane_acl.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_control_plane_acl.py new file mode 100644 index 000000000000..b0bbb578d36b --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_create_control_plane_acl.py @@ -0,0 +1,81 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python access_control_lists_create_control_plane_acl.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.access_control_lists.begin_create( + resource_group_name="example-resource-group", + access_control_list_name="example-acl", + body={ + "location": "eastus", + "properties": { + "aclType": "ControlPlaneTrafficPolicy", + "aclsUrl": "https://microsoft.com/a", + "administrativeState": "Enabled", + "annotation": "annotation", + "configurationType": "Inline", + "controlPlaneAclConfiguration": [ + { + "ipAddressType": "IPv4", + "matchConfigurations": [ + { + "action": {"remarkComment": "remark", "type": "Drop"}, + "matchCondition": { + "flags": ["established"], + "icmpConfiguration": {"icmpTypes": ["icmp"]}, + "ipCondition": { + "destinationIpPrefix": "10.0.0.0/24", + "sourceIpPrefix": "10.0.0.0/24", + }, + "portCondition": { + "destinationPorts": {"portMatchType": "eq", "ports": ["200"]}, + "sourcePorts": {"portMatchType": "eq", "ports": ["100"]}, + }, + "protocolTypes": "tcp", + "ttlMatchCondition": {"ttlMatchType": "eq", "ttlValue": "1"}, + }, + "matchConfigurationName": "example-match-config", + "sequenceNumber": 3779271459, + } + ], + } + ], + "defaultAction": "Permit", + "deviceRole": "CE", + }, + "tags": {"key5032": "example-tag-value"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/AccessControlLists_Create_ControlPlaneAcl.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete.py index c924a1a3dddb..0231028be3bc 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_delete_maximum_set_gen.py + python access_control_lists_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.access_control_lists.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get.py index be386193f851..479bbed48f32 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_get_maximum_set_gen.py + python access_control_lists_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group.py index 1c6cc2e863b3..f7d74eccbc7b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_list_by_resource_group_maximum_set_gen.py + python access_control_lists_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription.py index 4336747192f8..7eb87f17cc4c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_list_by_subscription_maximum_set_gen.py + python access_control_lists_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync.py index 288b0e45e5d6..8d8cda7df607 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_resync.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_resync_maximum_set_gen.py + python access_control_lists_resync.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.begin_resync( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Resync_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_Resync.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update.py similarity index 79% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update.py index 9b818d93c2cb..9576b0eed444 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_update_maximum_set_gen.py + python access_control_lists_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.begin_update( @@ -36,10 +35,12 @@ def main(): access_control_list_name="example-acl", body={ "properties": { + "aclType": "ControlPlaneTrafficPolicy", "aclsUrl": "https://microsoft.com/a", "annotation": "annotation", "configurationType": "File", "defaultAction": "Permit", + "deviceRole": "CE", "dynamicMatchConfigurations": [ { "ipGroups": [ @@ -49,15 +50,25 @@ def main(): "vlanGroups": [{"name": "example-vlanGroup", "vlans": ["20-30"]}], } ], + "globalAccessControlListActions": {"enableCount": "True"}, "matchConfigurations": [ { - "actions": [{"counterName": "example-counter", "type": "Count"}], + "actions": [ + { + "policeRateConfiguration": { + "bitRate": {"rate": 15, "unit": "bps"}, + "burstSize": {"size": 2, "unit": "Bytes"}, + }, + "type": "PoliceRate", + } + ], "ipAddressType": "IPv4", "matchConditions": [ { "dscpMarkings": ["32"], "etherTypes": ["0x1"], "fragments": ["0xff00-0xffff"], + "icmpConfiguration": {"icmpTypes": ["echo"]}, "ipCondition": { "ipGroupNames": ["example-ipGroup"], "ipPrefixValues": ["10.20.20.20/12"], @@ -72,6 +83,7 @@ def main(): "portType": "SourcePort", "ports": ["1-20"], }, + "protocolNeighbors": ["example-neighbor"], "protocolTypes": ["TCP"], "ttlValues": ["23"], "vlanMatchCondition": { @@ -86,12 +98,12 @@ def main(): } ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state.py index 6e96da97c148..ddbffbf8713d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_update_administrative_state_maximum_set_gen.py + python access_control_lists_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.begin_update_administrative_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration.py index 5a0391af3c92..5be207960ca1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/access_control_lists_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python access_control_lists_validate_configuration_maximum_set_gen.py + python access_control_lists_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.access_control_lists.begin_validate_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/AccessControlLists_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create.py index ad82153c46e2..7b179f78d088 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python external_networks_create_maximum_set_gen.py + python external_networks_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +28,13 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.external_networks.begin_create( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", - external_network_name="example-externalnetwork", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", body={ "properties": { "annotation": "annotation", @@ -42,42 +42,54 @@ def main(): "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importRoutePolicy": { "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "importRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", "optionAProperties": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 15}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "bmpConfiguration": {"configurationState": "Enabled"}, "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "ingressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "mtu": 1500, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 7, "maximumRoutes": 14, "threshold": 17}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 7, "maximumRoutes": 14, "threshold": 17}] + }, "peerASN": 65047, "primaryIpv4Prefix": "10.1.1.0/30", "primaryIpv6Prefix": "3FFE:FFFF:0:CD30::a0/126", "secondaryIpv4Prefix": "10.1.1.4/30", "secondaryIpv6Prefix": "3FFE:FFFF:0:CD30::a4/126", + "v4OverV6BgpSession": "Enabled", + "v6OverV4BgpSession": "Enabled", "vlanId": 1001, }, "optionBProperties": { "exportRouteTargets": ["65046:10039"], "importRouteTargets": ["65046:10039"], "routeTargets": { - "exportIpv4RouteTargets": ["65046:10039"], - "exportIpv6RouteTargets": ["65046:10039"], - "importIpv4RouteTargets": ["65046:10039"], - "importIpv6RouteTargets": ["65046:10039"], + "exportIpv4RouteTargets": ["65046:10050"], + "exportIpv6RouteTargets": ["65046:10050"], + "importIpv4RouteTargets": ["65046:10050"], + "importIpv6RouteTargets": ["65046:10050"], }, }, "peeringOption": "OptionA", + "staticRouteConfiguration": { + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1/24"}], + "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], + }, } }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/ExternalNetworks_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete.py new file mode 100644 index 000000000000..218964ee31f0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python external_networks_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.external_networks.begin_delete( + resource_group_name="example-rg", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", + ).result() + + +# x-ms-original-file: 2025-07-15/ExternalNetworks_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py deleted file mode 100644 index 54cb3f4b87ec..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_delete_maximum_set_gen.py +++ /dev/null @@ -1,43 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python external_networks_delete_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", - ) - - client.external_networks.begin_delete( - resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", - external_network_name="example-externalnetwork", - ).result() - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Delete_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get.py new file mode 100644 index 000000000000..475a541cc223 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python external_networks_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.external_networks.get( + resource_group_name="example-rg", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", + ) + print(response) + + +# x-ms-original-file: 2025-07-15/ExternalNetworks_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py deleted file mode 100644 index 566effab91a7..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_get_maximum_set_gen.py +++ /dev/null @@ -1,44 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python external_networks_get_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="42EEDB3B-8E17-46E3-B0B4-B1CD9842D90D", - ) - - response = client.external_networks.get( - resource_group_name="rgL3IsolationDomains", - l3_isolation_domain_name="yhtr", - external_network_name="fltpszzikbalrzaqq", - ) - print(response) - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain.py index 7ea322ff4aa5..47008078e992 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_list_by_l3_isolation_domain.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python external_networks_list_by_l3_isolation_domain_maximum_set_gen.py + python external_networks_list_by_l3_isolation_domain.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.external_networks.list_by_l3_isolation_domain( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-externalnetwork", ) for item in response: print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/ExternalNetworks_ListByL3IsolationDomain.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update.py similarity index 67% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update.py index 3e57c447b713..1e5e0cac549f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python external_networks_update_maximum_set_gen.py + python external_networks_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +28,13 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.external_networks.begin_update( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", - external_network_name="example-externalnetwork", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", body={ "properties": { "annotation": "annotation1", @@ -42,41 +42,54 @@ def main(): "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importRoutePolicy": { "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "importRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", "optionAProperties": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 15}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "bmpConfiguration": {"configurationState": "Enabled"}, "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "ingressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "mtu": 1500, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 8, "maximumRoutes": 13, "threshold": 24}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 8, "maximumRoutes": 13, "threshold": 24}] + }, "peerASN": 65047, "primaryIpv4Prefix": "10.1.1.0/30", "primaryIpv6Prefix": "3FFE:FFFF:0:CD30::a0/126", "secondaryIpv4Prefix": "10.1.1.4/30", "secondaryIpv6Prefix": "3FFE:FFFF:0:CD30::a4/126", + "v4OverV6BgpSession": "Enabled", + "v6OverV4BgpSession": "Enabled", "vlanId": 1001, }, "optionBProperties": { "exportRouteTargets": ["65046:10039"], "importRouteTargets": ["65046:10039"], "routeTargets": { - "exportIpv4RouteTargets": ["65046:10039"], - "exportIpv6RouteTargets": ["65046:10039"], - "importIpv4RouteTargets": ["65046:10039"], - "importIpv6RouteTargets": ["65046:10039"], + "exportIpv4RouteTargets": ["65046:10050"], + "exportIpv6RouteTargets": ["65046:10050"], + "importIpv4RouteTargets": ["65046:10050"], + "importIpv6RouteTargets": ["65046:10050"], }, }, "peeringOption": "OptionA", + "staticRouteConfiguration": { + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1/14"}], + "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], + }, } }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/ExternalNetworks_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state.py new file mode 100644 index 000000000000..17f9872c6554 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python external_networks_update_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.external_networks.begin_update_administrative_state( + resource_group_name="example-rg", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", + body={"resourceIds": [""], "state": "Enable"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py deleted file mode 100644 index 3e866c2c57f0..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_administrative_state_maximum_set_gen.py +++ /dev/null @@ -1,45 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python external_networks_update_administrative_state_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", - ) - - response = client.external_networks.begin_update_administrative_state( - resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", - external_network_name="example-externalnetwork", - body={"resourceIds": [""], "state": "Enable"}, - ).result() - print(response) - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_bfd_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_bfd_administrative_state.py new file mode 100644 index 000000000000..36f71deb8c21 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_bfd_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python external_networks_update_bfd_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.external_networks.begin_update_bfd_administrative_state( + resource_group_name="example-rg", + l3_isolation_domain_name="example-externalnetwork", + external_network_name="example-ext", + body={"administrativeState": "Enable", "routeType": "Static"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateBfdAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state.py similarity index 79% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state.py index f16e5b908751..207d9a93142e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/external_networks_update_static_route_bfd_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python external_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py + python external_networks_update_static_route_bfd_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.external_networks.begin_update_static_route_bfd_administrative_state( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create.py index aec929b3be5c..8bd7b45d2a06 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_create_maximum_set_gen.py + python internal_networks_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,12 +28,12 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.begin_create( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", internal_network_name="example-internalnetwork", body={ "properties": { @@ -42,13 +42,24 @@ def main(): "allowAS": 10, "allowASOverride": "Enable", "annotation": "annotation", - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 5}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "bmpConfiguration": { + "bmpConfigurationState": "Enabled", + "exportPolicyConfiguration": {"exportPolicies": ["Pre-Policy"]}, + "neighborIpExclusions": ["10.0.0.1"], + }, "defaultRouteOriginate": "True", "ipv4ListenRangePrefixes": ["10.1.0.0/25"], - "ipv4NeighborAddress": [{"address": "10.1.0.0"}], + "ipv4NeighborAddress": [ + {"address": "10.1.0.0", "bfdAdministrativeState": "Enable", "bgpAdministrativeState": "Enable"} + ], "ipv6ListenRangePrefixes": ["2fff::/66"], - "ipv6NeighborAddress": [{"address": "2fff::"}], + "ipv6NeighborAddress": [ + {"address": "2fff::", "bfdAdministrativeState": "Enable", "bgpAdministrativeState": "Enable"} + ], "peerASN": 61234, + "v4OverV6BgpSession": "Enabled", + "v6OverV4BgpSession": "Enabled", }, "connectedIPv4Subnets": [{"annotation": "annotation", "prefix": "10.0.0.0/24"}], "connectedIPv6Subnets": [{"annotation": "annotation", "prefix": "3FFE:FFFF:0:CD30::a0/29"}], @@ -57,20 +68,24 @@ def main(): "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "extension": "NoExtension", "importRoutePolicy": { "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "importRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "ingressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "isMonitoringEnabled": "True", "mtu": 1500, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 28, "maximumRoutes": 23, "threshold": 7}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 28, "maximumRoutes": 23, "threshold": 7}] + }, "staticRouteConfiguration": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 15}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, "extension": "NoExtension", - "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1/24"}], "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], }, "vlanId": 755, @@ -80,6 +95,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete.py index c58a470645f4..ff823045f06a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_delete_maximum_set_gen.py + python internal_networks_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,16 +27,16 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.internal_networks.begin_delete( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", internal_network_name="example-internalnetwork", ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get.py index ed959a6f7dd7..2182603b20f9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_get_maximum_set_gen.py + python internal_networks_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.get( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", internal_network_name="example-internalnetwork", ) print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain.py index ecba937f926c..7d52ca045f20 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_list_by_l3_isolation_domain.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_list_by_l3_isolation_domain_maximum_set_gen.py + python internal_networks_list_by_l3_isolation_domain.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.list_by_l3_isolation_domain( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", ) for item in response: print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_ListByL3IsolationDomain.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update.py index 864e2719117b..de21937f1ccb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_update_maximum_set_gen.py + python internal_networks_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,12 +28,12 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.begin_update( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", internal_network_name="example-internalnetwork", body={ "properties": { @@ -42,34 +42,45 @@ def main(): "allowAS": 10, "allowASOverride": "Enable", "annotation": "annotation", - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 5}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "bmpConfiguration": {"bmpConfigurationState": "Enabled", "neighborIpExclusions": ["10.0.0.10"]}, "defaultRouteOriginate": "True", "ipv4ListenRangePrefixes": ["10.1.0.0/25"], - "ipv4NeighborAddress": [{"address": "10.1.0.0"}], + "ipv4NeighborAddress": [ + {"address": "10.1.0.0", "bfdAdministrativeState": "Enable", "bgpAdministrativeState": "Enable"} + ], "ipv6ListenRangePrefixes": ["2fff::/66"], - "ipv6NeighborAddress": [{"address": "2fff::"}], + "ipv6NeighborAddress": [ + {"address": "10.1.0.0", "bfdAdministrativeState": "Enable", "bgpAdministrativeState": "Enable"} + ], "peerASN": 61234, + "v4OverV6BgpSession": "Enabled", + "v6OverV4BgpSession": "Enabled", }, "connectedIPv4Subnets": [{"annotation": "annotation", "prefix": "10.0.0.0/24"}], - "connectedIPv6Subnets": [{"annotation": "annotation", "prefix": "3FFE:FFFF:0:CD30::a0/29"}], + "connectedIPv6Subnets": [{"annotation": "annotation", "prefix": "10.0.0.0/24"}], "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "exportRoutePolicy": { "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importRoutePolicy": { "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }, - "importRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", "ingressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "isMonitoringEnabled": "True", "mtu": 1500, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 20, "maximumRoutes": 24, "threshold": 6}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 20, "maximumRoutes": 24, "threshold": 6}] + }, "staticRouteConfiguration": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 15}, - "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "20.20.20.20/25"}], - "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], + "ipv6Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], }, } }, @@ -77,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state.py index 4fea4f323f42..3d6a021b5f91 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_update_administrative_state_maximum_set_gen.py + python internal_networks_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,18 +27,18 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.begin_update_administrative_state( resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", + l3_isolation_domain_name="example-l3isd", internal_network_name="example-internalnetwork", body={"resourceIds": [""], "state": "Enable"}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bfd_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bfd_administrative_state.py new file mode 100644 index 000000000000..5ed66e8470a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bfd_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python internal_networks_update_bfd_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.internal_networks.begin_update_bfd_administrative_state( + resource_group_name="example-rg", + l3_isolation_domain_name="example-l3isd", + internal_network_name="example-internalnetwork", + body={"administrativeState": "Enable", "neighborAddress": "10.10.1.10", "routeType": "Static"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBfdAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state.py new file mode 100644 index 000000000000..1aefd965bb3f --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python internal_networks_update_bgp_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.internal_networks.begin_update_bgp_administrative_state( + resource_group_name="example-rg", + l3_isolation_domain_name="example-l3isd", + internal_network_name="example-internalnetwork", + body={"administrativeState": "Enable", "neighborAddress": "10.10.10.10"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/InternalNetworks_UpdateBgpAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py deleted file mode 100644 index fdc8e3b9b99a..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_bgp_administrative_state_maximum_set_gen.py +++ /dev/null @@ -1,45 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python internal_networks_update_bgp_administrative_state_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", - ) - - response = client.internal_networks.begin_update_bgp_administrative_state( - resource_group_name="example-rg", - l3_isolation_domain_name="example-l3domain", - internal_network_name="example-internalNetwork", - body={"resourceIds": [""], "state": "Enable"}, - ).result() - print(response) - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state.py similarity index 79% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state.py index 4af851355f00..ba58d7a46d60 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internal_networks_update_static_route_bfd_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internal_networks_update_static_route_bfd_administrative_state_maximum_set_gen.py + python internal_networks_update_static_route_bfd_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internal_networks.begin_update_static_route_bfd_administrative_state( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternalNetworks_UpdateStaticRouteBfdAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create.py similarity index 69% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create.py index 4b63477d2355..ad1437c9b4d2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_create_maximum_set_gen.py + python internet_gateway_rules_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateway_rules.begin_create( @@ -38,14 +37,21 @@ def main(): "location": "eastus", "properties": { "annotation": "annotationValue", - "ruleProperties": {"action": "Allow", "addressList": ["10.10.10.10"]}, + "ruleProperties": { + "action": "Allow", + "addressList": ["10.10.10.10"], + "condition": "Or", + "destinationAddressList": ["11.11.10.11"], + "headerAddressList": [{"addressList": ["10.10.10.10"], "headerName": "abcHeader"}], + "sourceAddressList": ["10.10.10.10"], + }, }, - "tags": {"keyID": "keyValue"}, + "tags": {"KeyID": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete.py index b214f58a5176..16451694842e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_delete_maximum_set_gen.py + python internet_gateway_rules_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.internet_gateway_rules.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get.py index cb9a4bbcf638..626a10f703f8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_get_maximum_set_gen.py + python internet_gateway_rules_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateway_rules.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group.py index 52f38edfbe1f..9834f28840f8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_list_by_resource_group_maximum_set_gen.py + python internet_gateway_rules_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateway_rules.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription.py index df530aee3817..4577874559f8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_list_by_subscription_maximum_set_gen.py + python internet_gateway_rules_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateway_rules.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update.py index 66a276e7919c..f6859c602f86 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateway_rules_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateway_rules_update_maximum_set_gen.py + python internet_gateway_rules_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateway_rules.begin_update( resource_group_name="example-rg", internet_gateway_rule_name="example-internetGatewayRule", - body={"tags": {"key3311": "1234"}}, + body={"tags": {"KeyID": "KeyValue1"}}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGatewayRules_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create.py similarity index 83% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create.py index e02e6c57dff7..163e17108eac 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_create_maximum_set_gen.py + python internet_gateways_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +28,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateways.begin_create( @@ -39,15 +39,16 @@ def main(): "properties": { "annotation": "annotation", "internetGatewayRuleId": "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule", + "internetGatewayType": "Infrastructure", "networkFabricControllerId": "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController", "type": "Infrastructure", }, - "tags": {"key3540": "1234"}, + "tags": {"keyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete.py index 03861932b591..374f260d1290 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_delete_maximum_set_gen.py + python internet_gateways_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.internet_gateways.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get.py index 15a1a66eaaa0..c7092502c5d0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_get_maximum_set_gen.py + python internet_gateways_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateways.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group.py index c28fd7e79b32..e5586a5156cd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_list_by_resource_group_maximum_set_gen.py + python internet_gateways_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateways.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription.py index 2046b5998b76..1c4bbbb68e5e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_list_by_subscription_maximum_set_gen.py + python internet_gateways_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateways.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update.py index 83960258e95c..af361516b1bd 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/internet_gateways_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python internet_gateways_update_maximum_set_gen.py + python internet_gateways_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +28,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.internet_gateways.begin_update( @@ -38,12 +38,12 @@ def main(): "properties": { "internetGatewayRuleId": "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule" }, - "tags": {"key81": "2345"}, + "tags": {"keyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/InternetGateways_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create.py index ea118dd7b093..c91d5a01fa92 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_create_maximum_set_gen.py + python ip_communities_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_communities.begin_create( @@ -37,6 +36,7 @@ def main(): body={ "location": "eastus", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "ipCommunityRules": [ { @@ -47,12 +47,12 @@ def main(): } ], }, - "tags": {"keyId": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete.py index 1f6eb78c2e35..c24049240715 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_delete_maximum_set_gen.py + python ip_communities_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.ip_communities.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get.py index 3c372026ce43..8de4f4333a05 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_get_maximum_set_gen.py + python ip_communities_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_communities.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group.py index 950a9ffef423..a7577e4aaacf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_list_by_resource_group_maximum_set_gen.py + python ip_communities_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_communities.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription.py index c8ee03ce308b..a679b8d20603 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_list_by_subscription_maximum_set_gen.py + python ip_communities_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_communities.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update.py index 8fc5735c69fe..3086a96d8a9b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_communities_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_communities_update_maximum_set_gen.py + python ip_communities_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_communities.begin_update( @@ -44,12 +43,13 @@ def main(): "wellKnownCommunities": ["Internet"], } ] - } + }, + "tags": {"keyID": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpCommunities_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create.py similarity index 78% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create.py index 01af64fa7f9b..77d8cbd763e6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_create_maximum_set_gen.py + python ip_extended_communities_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_extended_communities.begin_create( @@ -37,17 +36,18 @@ def main(): body={ "location": "eastus", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "ipExtendedCommunityRules": [ {"action": "Permit", "routeTargets": ["1234:2345"], "sequenceNumber": 4155123341} ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete.py index 7a215007aeb8..a7e5d77f086b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_delete_maximum_set_gen.py + python ip_extended_communities_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.ip_extended_communities.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get.py index 8c30caac454d..32ce7bdbd5a5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_get_maximum_set_gen.py + python ip_extended_communities_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_extended_communities.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group.py index 1b6073927db8..36d9347a7df1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_list_by_resource_group_maximum_set_gen.py + python ip_extended_communities_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_extended_communities.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription.py index 5ee5d28ff1ee..c3aaa7335458 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_list_by_subscription_maximum_set_gen.py + python ip_extended_communities_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_extended_communities.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update.py index 88ad47fcb9a4..8c464a958427 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_extended_communities_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_extended_communities_update_maximum_set_gen.py + python ip_extended_communities_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_extended_communities.begin_update( @@ -36,16 +35,17 @@ def main(): ip_extended_community_name="example-ipExtendedCommunity", body={ "properties": { + "annotation": "annotation", "ipExtendedCommunityRules": [ {"action": "Permit", "routeTargets": ["1234:2345"], "sequenceNumber": 4155123341} - ] + ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpExtendedCommunities_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create.py index 90aaa33d5ba5..4c29b75038ab 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_create_maximum_set_gen.py + python ip_prefixes_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_prefixes.begin_create( @@ -37,6 +36,7 @@ def main(): body={ "location": "eastus", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "ipPrefixRules": [ { @@ -48,12 +48,12 @@ def main(): } ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete.py index 3d739ffe2c61..9fd869875138 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_delete_maximum_set_gen.py + python ip_prefixes_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.ip_prefixes.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get.py index 6c9fcab5b202..434f1f29ccc4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_get_maximum_set_gen.py + python ip_prefixes_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_prefixes.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group.py index ca55452abb3f..85c399b1ad74 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_list_by_resource_group_maximum_set_gen.py + python ip_prefixes_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_prefixes.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription.py index d9f896941919..1f8a2802947e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_list_by_subscription_maximum_set_gen.py + python ip_prefixes_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_prefixes.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update.py index e8d767a418ef..bd7a54e795b9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/ip_prefixes_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python ip_prefixes_update_maximum_set_gen.py + python ip_prefixes_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.ip_prefixes.begin_update( @@ -47,12 +46,12 @@ def main(): } ], }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/IpPrefixes_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration.py index 2eb799e0b19a..18245f6834eb 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_commit_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_commit_configuration_maximum_set_gen.py + python l2_isolation_domains_commit_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.begin_commit_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_CommitConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create.py index 45cc837d8ed2..fdb86cbdde6f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_create_maximum_set_gen.py + python l2_isolation_domains_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,26 +28,30 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.begin_create( resource_group_name="example-rg", l2_isolation_domain_name="example-l2domain", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastus", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", + "extendedVlan": "Enabled", "mtu": 1500, "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", + "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", "vlanId": 501, }, - "tags": {"keyID": "keyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete.py index e02e3a3b78c8..963ff7e055c5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_delete_maximum_set_gen.py + python l2_isolation_domains_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,15 +27,15 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.l2_isolation_domains.begin_delete( resource_group_name="example-rg", - l2_isolation_domain_name="example-l2Domain", + l2_isolation_domain_name="example-l2domain", ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get.py index 1f952023812c..19aeec74db61 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_get_maximum_set_gen.py + python l2_isolation_domains_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,16 +27,16 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.get( resource_group_name="example-rg", - l2_isolation_domain_name="example-l2Domain", + l2_isolation_domain_name="example-l2domain", ) print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group.py index c3e155a844ad..2dfde57f4934 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_list_by_resource_group_maximum_set_gen.py + python l2_isolation_domains_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription.py index 945367b4ce2e..d7e51b2bcf54 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_list_by_subscription_maximum_set_gen.py + python l2_isolation_domains_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update.py new file mode 100644 index 000000000000..e9b311de0fc9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update.py @@ -0,0 +1,52 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python l2_isolation_domains_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.l2_isolation_domains.begin_update( + resource_group_name="example-rg", + l2_isolation_domain_name="example-l2domain", + body={ + "identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, + "properties": { + "annotation": "annotation1", + "mtu": 6000, + "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", + }, + "tags": {"KeyId": "KeyValue"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/L2IsolationDomains_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state.py index fcc3a4d8abf1..4aba1b5c279c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_update_administrative_state_maximum_set_gen.py + python l2_isolation_domains_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.begin_update_administrative_state( resource_group_name="example-rg", - l2_isolation_domain_name="example-l2Domain", + l2_isolation_domain_name="example-l2domain", body={"resourceIds": [""], "state": "Enable"}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py deleted file mode 100644 index d96763838208..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_update_maximum_set_gen.py +++ /dev/null @@ -1,44 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python l2_isolation_domains_update_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", - ) - - response = client.l2_isolation_domains.begin_update( - resource_group_name="example-rg", - l2_isolation_domain_name="example-l2Domain", - body={"properties": {"annotation": "annotation1", "mtu": 6000}, "tags": {"keyID": "keyValue"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Update_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration.py index 037baee18ad0..60cfff888936 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l2_isolation_domains_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l2_isolation_domains_validate_configuration_maximum_set_gen.py + python l2_isolation_domains_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l2_isolation_domains.begin_validate_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L2IsolationDomains_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration.py index fa5204745dbf..42a488dce3af 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_commit_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_commit_configuration_maximum_set_gen.py + python l3_isolation_domains_commit_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.begin_commit_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_CommitConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create.py similarity index 67% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create.py index 11ac71111363..4fb2bdcec7d8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_create_maximum_set_gen.py + python l3_isolation_domains_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,15 +28,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.begin_create( resource_group_name="example-rg", l3_isolation_domain_name="example-l3domain", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastus", "properties": { + "administrativeState": "Enabled", "aggregateRouteConfiguration": { "ipv4Routes": [{"prefix": "10.0.0.0/24"}], "ipv6Routes": [{"prefix": "3FFE:FFFF:0:CD30::a0/29"}], @@ -46,19 +48,27 @@ def main(): "exportRoutePolicy": { "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", - }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + } }, "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", + "redistributeStaticRoutes": "True", + "staticRouteRoutePolicy": { + "exportRoutePolicy": { + "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + } + }, + "uniqueRdConfiguration": {}, + "v4routePrefixLimit": {"hardLimit": 1000, "threshold": 90}, + "v6routePrefixLimit": {"hardLimit": 1000, "threshold": 90}, }, - "tags": {"keyID": "KeyValue"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete.py index 974841b3cd09..84c4549cd594 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_delete_maximum_set_gen.py + python l3_isolation_domains_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.l3_isolation_domains.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get.py index acc68603b9d9..390e1f7e450e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_get_maximum_set_gen.py + python l3_isolation_domains_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group.py index b0aa35260d20..38beb1288892 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_list_by_resource_group_maximum_set_gen.py + python l3_isolation_domains_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription.py index 9e3ddc8abb5f..c2ad90ebd907 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_list_by_subscription_maximum_set_gen.py + python l3_isolation_domains_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update.py similarity index 65% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update.py index 0ce4d047facd..f68ee67e2dc1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_update_maximum_set_gen.py + python l3_isolation_domains_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +28,14 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.begin_update( resource_group_name="example-rg", l3_isolation_domain_name="example-l3domain", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, "properties": { "aggregateRouteConfiguration": { "ipv4Routes": [{"prefix": "10.0.0.0/24"}], @@ -43,20 +44,28 @@ def main(): "annotation": "annotation1", "connectedSubnetRoutePolicy": { "exportRoutePolicy": { - "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", - "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", - }, - "exportRoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", + "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + } }, + "exportPolicyConfiguration": {"exportPolicies": ["Pre-Policy"]}, "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", + "redistributeStaticRoutes": "True", + "staticRouteRoutePolicy": { + "exportRoutePolicy": { + "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + } + }, + "v4routePrefixLimit": {"hardLimit": 1000, "threshold": 50}, + "v6routePrefixLimit": {"hardLimit": 1000, "threshold": 50}, }, - "tags": {"key4953": "1234"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state.py index b0777cea388b..ca39b9f71558 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_update_administrative_state_maximum_set_gen.py + python l3_isolation_domains_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.begin_update_administrative_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration.py index 84f4f149b3ec..e601def20978 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/l3_isolation_domains_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python l3_isolation_domains_validate_configuration_maximum_set_gen.py + python l3_isolation_domains_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.l3_isolation_domains.begin_validate_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/L3IsolationDomains_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create.py similarity index 81% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create.py index 2c10fa4a763a..ae5bc09c25e2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_create_maximum_set_gen.py + python neighbor_groups_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +27,14 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.neighbor_groups.begin_create( resource_group_name="example-rg", neighbor_group_name="example-neighborGroup", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastus", "properties": { "annotation": "annotation", @@ -53,12 +53,12 @@ def main(): "ipv6Addresses": ["2F::/100"], }, }, - "tags": {"key8107": "1234"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete.py index 56ff0c9819f3..eeced0e08536 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_delete_maximum_set_gen.py + python neighbor_groups_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.neighbor_groups.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get.py index 327a082c47e9..2aefcfea5932 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_get_maximum_set_gen.py + python neighbor_groups_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.neighbor_groups.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group.py index 93d2d1a8e518..33825e67120b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_list_by_resource_group_maximum_set_gen.py + python neighbor_groups_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.neighbor_groups.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription.py index 8e93c18ad74e..83c35f23476c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_list_by_subscription_maximum_set_gen.py + python neighbor_groups_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.neighbor_groups.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_resync.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_resync.py new file mode 100644 index 000000000000..63ff84e5fccd --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_resync.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python neighbor_groups_resync.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.neighbor_groups.begin_resync( + resource_group_name="example-rg", + neighbor_group_name="example-neighborgroup", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NeighborGroups_Resync.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update.py similarity index 81% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update.py index 9a20433c54f4..f64ea58fcafa 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/neighbor_groups_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python neighbor_groups_update_maximum_set_gen.py + python neighbor_groups_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +27,14 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.neighbor_groups.begin_update( resource_group_name="example-rg", neighbor_group_name="example-neighborGroup", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, "properties": { "annotation": "Updating", "destination": { @@ -52,12 +52,12 @@ def main(): "ipv6Addresses": ["2F::/100"], }, }, - "tags": {"key8107": "2345"}, + "tags": {"KeyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NeighborGroups_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_create.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_create.py index 789904c2d748..bf22235dcce5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_create_maximum_set_gen.py + python network_bootstrap_devices_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,26 +27,28 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) - response = client.network_devices.begin_create( + response = client.network_bootstrap_devices.begin_create( resource_group_name="example-rg", - network_device_name="example-device", + network_bootstrap_device_name="example-device", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastuseuap", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "hostName": "NFA-Device", "networkDeviceSku": "DeviceSku", "serialNumber": "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", }, - "tags": {"keyID": "KeyValue"}, + "tags": {}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_delete.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_delete.py new file mode 100644 index 000000000000..3e7923ca2212 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_delete.py @@ -0,0 +1,41 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.network_bootstrap_devices.begin_delete( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ).result() + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_get.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_get.py new file mode 100644 index 000000000000..326a71321a01 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_get.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.get( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ) + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_resource_group.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_resource_group.py new file mode 100644 index 000000000000..12fb378963c1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_resource_group.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_list_by_resource_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.list_by_resource_group( + resource_group_name="example-rg", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListByResourceGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_subscription.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_subscription.py new file mode 100644 index 000000000000..3d63a2a3a89e --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_list_by_subscription.py @@ -0,0 +1,40 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_list_by_subscription.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ListBySubscription.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_reboot.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_reboot.py new file mode 100644 index 000000000000..284c472fe212 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_reboot.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_reboot.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.begin_reboot( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Reboot.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_refresh_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_refresh_configuration.py new file mode 100644 index 000000000000..6e63bcd3f0d1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_refresh_configuration.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_refresh_configuration.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.begin_refresh_configuration( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_RefreshConfiguration.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_resync_passwords.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_resync_passwords.py new file mode 100644 index 000000000000..2ca6b70c6e97 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_resync_passwords.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_resync_passwords.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.begin_resync_passwords( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_ResyncPasswords.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update.py index 14945b24931f..2ec279359de9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_update_maximum_set_gen.py + python network_bootstrap_devices_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,24 +27,25 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) - response = client.network_devices.begin_update( + response = client.network_bootstrap_devices.begin_update( resource_group_name="example-rg", - network_device_name="example-device", + network_bootstrap_device_name="example-device", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, "properties": { "annotation": "annotation", "hostName": "NFA-Device", "serialNumber": "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", }, - "tags": {"keyID": "KeyValue"}, + "tags": {}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update_administrative_state.py new file mode 100644 index 000000000000..8f7689298607 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_update_administrative_state.py @@ -0,0 +1,49 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_update_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.begin_update_administrative_state( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + body={ + "resourceIds": [ + "/Subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkBootstrapDevices/example-device-1" + ], + "state": "RMA", + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_UpdateAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_upgrade.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_upgrade.py new file mode 100644 index 000000000000..04762bc46025 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_devices_upgrade.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_devices_upgrade.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_devices.begin_upgrade( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + body={"version": "1.0"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapDevices_Upgrade.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_create.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_create.py new file mode 100644 index 000000000000..fa53cce9719b --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_create.py @@ -0,0 +1,52 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_interfaces.begin_create( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + network_bootstrap_interface_name="example-interface", + body={ + "properties": { + "additionalDescription": "additionalDescription", + "administrativeState": "Enabled", + "annotation": "annotation", + "interfaceType": "Management", + "serialNumber": "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_delete.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_delete.py new file mode 100644 index 000000000000..2cf43c183537 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_delete.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.network_bootstrap_interfaces.begin_delete( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + network_bootstrap_interface_name="example-interface", + ).result() + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_get.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_get.py new file mode 100644 index 000000000000..c506640ec4c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_get.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_interfaces.get( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + network_bootstrap_interface_name="example-interface", + ) + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_list_by_network_bootstrap_device.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_list_by_network_bootstrap_device.py new file mode 100644 index 000000000000..924bdc577206 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_list_by_network_bootstrap_device.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_list_by_network_bootstrap_device.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_interfaces.list_by_network_bootstrap_device( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_ListByNetworkBootstrapDevice.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update.py new file mode 100644 index 000000000000..c62da7bd2bbf --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update.py @@ -0,0 +1,46 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_interfaces.begin_update( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + network_bootstrap_interface_name="example-interface", + body={ + "properties": {"annotation": "annotation", "serialNumber": "Vendor;Model;HardwareRevisionId;SerialNumber"} + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update_administrative_state.py new file mode 100644 index 000000000000..2c62f1e56107 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_bootstrap_interfaces_update_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_bootstrap_interfaces_update_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_bootstrap_interfaces.begin_update_administrative_state( + resource_group_name="example-rg", + network_bootstrap_device_name="example-device", + network_bootstrap_interface_name="example-interface", + body={"resourceIds": [""], "state": "Enable"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkBootstrapInterfaces_UpdateAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get.py index 9760bd0aeb86..946df8d30d98 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_device_skus_get_maximum_set_gen.py + python network_device_skus_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_device_skus.get( @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDeviceSkus_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription.py index ec30811cb1c5..547a798fb0b8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_device_skus_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_device_skus_list_by_subscription_maximum_set_gen.py + python network_device_skus_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_device_skus.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDeviceSkus_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create.py new file mode 100644 index 000000000000..e30ffd8ffe3a --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_create.py @@ -0,0 +1,65 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_create( + resource_group_name="example-rg", + network_device_name="example-device", + body={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity": {} + }, + }, + "location": "eastuseuap", + "properties": { + "administrativeState": "Enabled", + "annotation": "annotation", + "hostName": "NFA-Device", + "identitySelector": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + }, + "networkDeviceRole": "CE", + "networkDeviceSku": "DeviceSku", + "serialNumber": "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", + }, + "tags": {"KeyId": "KeyValue"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete.py index 639b68aa2b31..276363eeab03 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_delete_maximum_set_gen.py + python network_devices_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_devices.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get.py index 2d900597a210..ca4b9c3224d5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_get_maximum_set_gen.py + python network_devices_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group.py index 9c70efbfb5fb..d38b95537ce7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_list_by_resource_group_maximum_set_gen.py + python network_devices_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription.py index 3a52be9ccc8e..6f6f9852400e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_list_by_subscription_maximum_set_gen.py + python network_devices_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot.py index 63f6022d95fd..d2f52efcb1f8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_reboot.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_reboot_maximum_set_gen.py + python network_devices_reboot.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.begin_reboot( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Reboot_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_Reboot.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration.py index aceaab319706..97bd410da673 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_refresh_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_refresh_configuration_maximum_set_gen.py + python network_devices_refresh_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.begin_refresh_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_RefreshConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates.py new file mode 100644 index 000000000000..682308172810 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_resync_certificates.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_resync_certificates( + resource_group_name="example-rg", + network_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates_error.py new file mode 100644 index 000000000000..9b3e572893a6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_certificates_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_resync_certificates_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_resync_certificates( + resource_group_name="example-rg", + network_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_ResyncCertificates_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords.py new file mode 100644 index 000000000000..95802bd0e701 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_resync_passwords.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_resync_passwords( + resource_group_name="example-rg", + network_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords_error.py new file mode 100644 index 000000000000..afeffdefeba0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_resync_passwords_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_resync_passwords_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_resync_passwords( + resource_group_name="example-rg", + network_device_name="example-device", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_ResyncPasswords_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_ro_command.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_ro_command.py new file mode 100644 index 000000000000..5ac21c4b5361 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_ro_command.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_run_ro_command.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_run_ro_command( + resource_group_name="example-rg", + network_device_name="example-device", + body={"command": "show version"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_RunRoCommand.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_rw_command.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_rw_command.py new file mode 100644 index 000000000000..aa59939388a6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_run_rw_command.py @@ -0,0 +1,46 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_run_rw_command.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_run_rw_command( + resource_group_name="example-rg", + network_device_name="example-device", + body={ + "command": "show running-config", + "commandUrl": "https://example.blob.core.windows.net/commands/config.txt", + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_RunRwCommand.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update.py new file mode 100644 index 000000000000..102f66ac10d8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update.py @@ -0,0 +1,61 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_devices_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_devices.begin_update( + resource_group_name="example-rg", + network_device_name="example-device", + body={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity": {} + }, + }, + "properties": { + "annotation": "annotation", + "hostName": "NFA-Device", + "identitySelector": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + }, + "serialNumber": "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", + }, + "tags": {"KeyId": "KeyValue"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkDevices_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state.py index da71ff5c64cf..494b8e1a8abf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_update_administrative_state_maximum_set_gen.py + python network_devices_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.begin_update_administrative_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade.py similarity index 72% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade.py index d7b9c45f55cf..8951ce79f9ec 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_devices_upgrade.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_devices_upgrade_maximum_set_gen.py + python network_devices_upgrade.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_devices.begin_upgrade( - resource_group_name="example-rg", + resource_group_name="rgmanagednetworkfabric", network_device_name="example-device", - body={"version": "1.0.0"}, + body={"rwDeviceConfigUrl": "https://microsoft.com/a", "version": "1.0.0"}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Upgrade_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkDevices_Upgrade.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create.py similarity index 78% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create.py index 8b8466077b3b..6f57b4ee2fb2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_create_maximum_set_gen.py + python network_fabric_controllers_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,22 +28,24 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_controllers.begin_create( resource_group_name="example-rg", network_fabric_controller_name="example-networkController", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key4876": {}}}, "location": "eastus", "properties": { "annotation": "annotation", "infrastructureExpressRouteConnections": [ { - "expressRouteAuthorizationKey": "1234ABCD-0A1B-1234-5678-123456ABCDEF", + "expressRouteAuthorizationKey": "xxx-xxx-xxx", "expressRouteCircuitId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", } ], + "infrastructureServices": {"ipv4AddressSpaces": ["172.253.0.0/19"], "ipv6AddressSpaces": []}, "ipv4AddressSpace": "172.253.0.0/19", "ipv6AddressSpace": "::/60", "isWorkloadManagementNetworkEnabled": "True", @@ -51,16 +53,18 @@ def main(): "nfcSku": "Standard", "workloadExpressRouteConnections": [ { - "expressRouteAuthorizationKey": "xxxxx", + "expressRouteAuthorizationKey": "xxx-xxx-xxx", "expressRouteCircuitId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", } ], + "workloadServices": {"ipv4AddressSpaces": ["172.253.28.0/22"], "ipv6AddressSpaces": []}, }, + "tags": {"keyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete.py index 848564e7bf13..83102f60cbc1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_delete_maximum_set_gen.py + python network_fabric_controllers_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_fabric_controllers.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get.py index 1dbed3d003b7..d6689fc935b3 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_get_maximum_set_gen.py + python network_fabric_controllers_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_controllers.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group.py index bd4f212e5618..6c465e18ddac 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_list_by_resource_group_maximum_set_gen.py + python network_fabric_controllers_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_controllers.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription.py index 2aca46308f34..3ff4b8631181 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_list_by_subscription_maximum_set_gen.py + python network_fabric_controllers_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_controllers.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update.py index b9198f960298..707194d4f650 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_controllers_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_controllers_update_maximum_set_gen.py + python network_fabric_controllers_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,32 +28,34 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_controllers.begin_update( resource_group_name="example-rg", network_fabric_controller_name="example-networkController", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key1402": {}}}, "properties": { "infrastructureExpressRouteConnections": [ { - "expressRouteAuthorizationKey": "xxxxxxx", + "expressRouteAuthorizationKey": "xxx-xxx-xxx", "expressRouteCircuitId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", } ], "workloadExpressRouteConnections": [ { - "expressRouteAuthorizationKey": "xxxxxxx", + "expressRouteAuthorizationKey": "xxx-xxx-xxx", "expressRouteCircuitId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName", } ], - } + }, + "tags": {"keyId": "KeyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricControllers_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get.py index 1a9d648dbaf1..1f5878654580 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_skus_get_maximum_set_gen.py + python network_fabric_skus_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_skus.get( @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricSkus_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription.py index 6dceb2df53ce..686a60c2479c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabric_skus_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabric_skus_list_by_subscription_maximum_set_gen.py + python network_fabric_skus_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabric_skus.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabricSkus_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_arm_configuration_diff.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_arm_configuration_diff.py new file mode 100644 index 000000000000..0779dad8ec08 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_arm_configuration_diff.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_arm_configuration_diff.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_arm_configuration_diff( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ArmConfigurationDiff.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_batch_status.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_batch_status.py new file mode 100644 index 000000000000..4518102f456e --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_batch_status.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_commit_batch_status.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_commit_batch_status( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + body={"commitBatchId": "batch-id"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_CommitBatchStatus.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration.py index 0c5b4837ff3e..982ed81baa16 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_commit_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_commit_configuration_maximum_set_gen.py + python network_fabrics_commit_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,16 +27,16 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_commit_configuration( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-networkFabric", ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_CommitConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create.py index 520d6dc7bbf6..084b098e7941 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_create_maximum_set_gen.py + python network_fabrics_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,18 +28,24 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_create( resource_group_name="example-rg", network_fabric_name="example-fabric", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key872": {}}}, "location": "eastuseuap", "properties": { "annotation": "annotation", + "authorizedTransceiver": {"key": "example", "vendor": "vendorX"}, + "controlPlaneAcls": [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl" + ], "fabricASN": 29249, - "fabricVersion": "1.x.x", + "fabricVersion": "version1", + "hardwareAlertThreshold": 74, "ipv4Prefix": "10.18.0.0/19", "ipv6Prefix": "3FFE:FFFF:0:CD40::/59", "managementNetworkConfiguration": { @@ -59,10 +65,10 @@ def main(): "exportRouteTargets": ["65046:10050"], "importRouteTargets": ["65046:10050"], "routeTargets": { - "exportIpv4RouteTargets": ["65046:10039"], - "exportIpv6RouteTargets": ["65046:10039"], - "importIpv4RouteTargets": ["65046:10039"], - "importIpv6RouteTargets": ["65046:10039"], + "exportIpv4RouteTargets": ["65046:10050"], + "exportIpv6RouteTargets": ["65046:10050"], + "importIpv4RouteTargets": ["65046:10050"], + "importIpv6RouteTargets": ["65046:10050"], }, }, "peeringOption": "OptionA", @@ -83,10 +89,10 @@ def main(): "exportRouteTargets": ["65046:10050"], "importRouteTargets": ["65046:10050"], "routeTargets": { - "exportIpv4RouteTargets": ["65046:10039"], - "exportIpv6RouteTargets": ["65046:10039"], - "importIpv4RouteTargets": ["65046:10039"], - "importIpv6RouteTargets": ["65046:10039"], + "exportIpv4RouteTargets": ["65046:10050"], + "exportIpv6RouteTargets": ["65046:10050"], + "importIpv4RouteTargets": ["65046:10050"], + "importIpv6RouteTargets": ["65046:10050"], }, }, "peeringOption": "OptionA", @@ -96,22 +102,37 @@ def main(): "networkFabricSku": "M4-A400-A100-C16-aa", "rackCount": 4, "serverCountPerRack": 8, + "storageAccountConfiguration": { + "storageAccountId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage", + "storageAccountIdentity": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id", + }, + }, + "storageArrayCount": 1, "terminalServerConfiguration": { - "password": "xxxx", + "password": "xxx-xx-xx", "primaryIpv4Prefix": "10.0.0.12/30", "primaryIpv6Prefix": "4FFE:FFFF:0:CD30::a8/127", - "secondaryIpv4Prefix": "20.0.0.13/30", + "secondaryIpv4Prefix": "40.0.0.14/30", "secondaryIpv6Prefix": "6FFE:FFFF:0:CD30::ac/127", "serialNumber": "123456", "username": "username", }, + "trustedIpPrefixes": [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix" + ], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "Enabled", + "uniqueRdConfigurationState": "Enabled", + }, }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete.py index 3f1d0ee8ceb8..19d727724887 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_delete_maximum_set_gen.py + python network_fabrics_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_fabrics.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision.py index b24c01818b3b..50d5019bc354 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_deprovision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_deprovision_maximum_set_gen.py + python network_fabrics_deprovision.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_deprovision( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Deprovision.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_discard_commit_batch.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_discard_commit_batch.py new file mode 100644 index 000000000000..e7a0d083437d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_discard_commit_batch.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_discard_commit_batch.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_discard_commit_batch( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + body={"commitBatchId": "batchId1"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_DiscardCommitBatch.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get.py index 80a3f4a11249..bdce3cdd48f6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_get_maximum_set_gen.py + python network_fabrics_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology.py index 2e13136f87c0..b5ece7e5fcb5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_get_topology.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_get_topology_maximum_set_gen.py + python network_fabrics_get_topology.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_get_topology( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_GetTopology_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_GetTopology.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group.py index 11a9192d4b23..5d4b7ef3b340 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_list_by_resource_group_maximum_set_gen.py + python network_fabrics_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription.py index 90f82fd7f50e..1c1f01c869ce 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_list_by_subscription_maximum_set_gen.py + python network_fabrics_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_lock_fabric.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_lock_fabric.py new file mode 100644 index 000000000000..8bbeeca08f9b --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_lock_fabric.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_lock_fabric.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_lock_fabric( + resource_group_name="example-rg", + network_fabric_name="example-networkFabric", + body={"action": "Lock", "lockType": "Administrative"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_LockFabric.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision.py index 3855130e5b25..8b97faaa69cf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_provision.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_provision_maximum_set_gen.py + python network_fabrics_provision.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_provision( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_provision_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Provision.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration.py index a49de828e3e6..7008a6881435 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_refresh_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_refresh_configuration_maximum_set_gen.py + python network_fabrics_refresh_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_refresh_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_RefreshConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates.py new file mode 100644 index 000000000000..fbd6affdd548 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_certificates.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_error.py new file mode 100644 index 000000000000..82d482e2594a --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_certificates_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_partial_success.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_partial_success.py new file mode 100644 index 000000000000..a1450d8dbced --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_certificates_partial_success.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_certificates_partial_success.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncCertificates_PartialSuccess.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords.py new file mode 100644 index 000000000000..c945375a0da8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_passwords.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_error.py new file mode 100644 index 000000000000..5453d4446007 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_passwords_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_partial_success.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_partial_success.py new file mode 100644 index 000000000000..639f7d9fc6e0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_resync_passwords_partial_success.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_resync_passwords_partial_success.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_resync_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ResyncPasswords_PartialSuccess.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates.py new file mode 100644 index 000000000000..8391410ccae2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_certificates.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_error.py new file mode 100644 index 000000000000..b24436b8a61a --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_certificates_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_partial_success.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_partial_success.py new file mode 100644 index 000000000000..20872df9aa37 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_certificates_partial_success.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_certificates_partial_success.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_certificates( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotateCertificates_PartialSuccess.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords.py new file mode 100644 index 000000000000..d37840281e51 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_passwords.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_error.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_error.py new file mode 100644 index 000000000000..4f4bdea360ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_error.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_passwords_error.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_Error.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_partial_success.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_partial_success.py new file mode 100644 index 000000000000..47d60a5f7a4c --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_rotate_passwords_partial_success.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_rotate_passwords_partial_success.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_rotate_passwords( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_RotatePasswords_PartialSuccess.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update.py index 0d90a73a3368..7f5d5cbccdb0 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_update_maximum_set_gen.py + python network_fabrics_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,16 +28,22 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_update( resource_group_name="example-rg", network_fabric_name="example-fabric", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key872": {}}}, "properties": { "annotation": "annotation1", + "controlPlaneAcls": [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl" + ], "fabricASN": 12345, + "featureFlags": [{"featureFlagName": "uniqueRdConfiguration", "featureFlagValue": "Enabled"}], + "hardwareAlertThreshold": 43, "ipv4Prefix": "10.18.0.0/17", "ipv6Prefix": "3FFE:FFFF:0:CD40::/60", "managementNetworkConfiguration": { @@ -63,12 +69,12 @@ def main(): "importIpv6RouteTargets": ["65046:10050"], }, }, - "peeringOption": "OptionB", + "peeringOption": "OptionA", }, "workloadVpnConfiguration": { "networkToNetworkInterconnectId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni", "optionAProperties": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 5}, + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, "mtu": 1500, "peerASN": 61234, "primaryIpv4Prefix": "10.0.0.14/30", @@ -90,8 +96,16 @@ def main(): "peeringOption": "OptionA", }, }, + "qosConfiguration": {"qosConfigurationState": "Enabled"}, "rackCount": 6, "serverCountPerRack": 10, + "storageAccountConfiguration": { + "storageAccountId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/nfStorage", + "storageAccountIdentity": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-id", + }, + }, "terminalServerConfiguration": { "password": "xxxxxxxx", "primaryIpv4Prefix": "10.0.0.12/30", @@ -101,13 +115,20 @@ def main(): "serialNumber": "1234567", "username": "username1", }, + "trustedIpPrefixes": [ + "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-prefix" + ], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "Enabled", + "uniqueRdConfigurationState": "Enabled", + }, }, - "tags": {"keyID": "KeyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration.py similarity index 78% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration.py index f5f1e73586fd..f732c4aaef22 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_infra_management_bfd_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_update_infra_management_bfd_configuration_maximum_set_gen.py + python network_fabrics_update_infra_management_bfd_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_update_infra_management_bfd_configuration( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateInfraManagementBfdConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_qo_s.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_qo_s.py new file mode 100644 index 000000000000..20766705e738 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_qo_s.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_update_qo_s.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_update( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + body={"properties": {"qosConfiguration": {"qosConfigurationState": "Enabled"}}}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_Update_QoS.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration.py similarity index 78% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration.py index c5d3c84e8879..079338e4b97a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_update_workload_management_bfd_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_update_workload_management_bfd_configuration_maximum_set_gen.py + python network_fabrics_update_workload_management_bfd_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_update_workload_management_bfd_configuration( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade.py index 35fa66f254c3..bf5688ec7882 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_upgrade.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_upgrade_maximum_set_gen.py + python network_fabrics_upgrade.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_upgrade( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_upgrade_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_Upgrade.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration.py index 270e35170519..d5652f6dd118 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_fabrics_validate_configuration_maximum_set_gen.py + python network_fabrics_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_fabrics.begin_validate_configuration( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkFabrics_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_view_device_configuration.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_view_device_configuration.py new file mode 100644 index 000000000000..521f1be2e997 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_fabrics_view_device_configuration.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_fabrics_view_device_configuration.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_fabrics.begin_view_device_configuration( + resource_group_name="example-rg", + network_fabric_name="example-fabric", + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkFabrics_ViewDeviceConfiguration.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create.py index b607003b9a56..ce7ac8181253 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_create.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_interfaces_create_maximum_set_gen.py + python network_interfaces_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,18 +27,24 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_interfaces.begin_create( resource_group_name="example-rg", network_device_name="example-device", network_interface_name="example-interface", - body={"properties": {"annotation": "annotation"}}, + body={ + "properties": { + "additionalDescription": "device 1", + "annotation": "annotation", + "interfaceType": "Management", + } + }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkInterfaces_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete.py new file mode 100644 index 000000000000..073a6a944b32 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_interfaces_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.network_interfaces.begin_delete( + resource_group_name="example-rg", + network_device_name="example-device", + network_interface_name="example-interface", + ).result() + + +# x-ms-original-file: 2025-07-15/NetworkInterfaces_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py deleted file mode 100644 index 1661916bdfae..000000000000 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_delete_maximum_set_gen.py +++ /dev/null @@ -1,43 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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 azure.identity import DefaultAzureCredential - -from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-managednetworkfabric -# USAGE - python network_interfaces_delete_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ManagedNetworkFabricMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="94D0FD57-C08B-4CA3-A926-6B76D8B7B956", - ) - - client.network_interfaces.begin_delete( - resource_group_name="rgNetworkDevices", - network_device_name="sjzd", - network_interface_name="emrgu", - ).result() - - -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get.py index 10e4738288df..5f4aadac8b95 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_interfaces_get_maximum_set_gen.py + python network_interfaces_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_interfaces.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkInterfaces_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device.py index 944b14b1fb44..9e10c41556a8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_list_by_network_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_interfaces_list_by_network_device_maximum_set_gen.py + python network_interfaces_list_by_network_device.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_interfaces.list_by_network_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkInterfaces_ListByNetworkDevice.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update.py index 1cbae0efae6a..32e5d513e700 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_interfaces_update_maximum_set_gen.py + python network_interfaces_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,18 +27,18 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_interfaces.begin_update( resource_group_name="example-rg", network_device_name="example-device", network_interface_name="example-interface", - body={"properties": {"annotation": "annotation"}}, + body={"properties": {"additionalDescription": "device 1", "annotation": "annotation"}}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkInterfaces_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state.py index 83044d7165e0..a7071fd8306f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_interfaces_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_interfaces_update_administrative_state_maximum_set_gen.py + python network_interfaces_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_interfaces.begin_update_administrative_state( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkInterfaces_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_create.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_create.py new file mode 100644 index 000000000000..155805dacc50 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_create.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.begin_create( + resource_group_name="example-rg", + network_monitor_name="example-monitor", + body={ + "location": "eastus", + "properties": { + "administrativeState": "Enabled", + "annotation": "annotation", + "bmpConfiguration": { + "exportPolicy": "Pre-Policy", + "exportPolicyConfiguration": {"exportPolicies": ["Pre-Policy"]}, + "monitoredAddressFamilies": ["ipv4Unicast"], + "monitoredNetworks": [ + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + "scopeResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", + "stationConfigurationState": "Enabled", + "stationConnectionMode": "Active", + "stationConnectionProperties": {"keepaliveIdleTime": 49, "probeCount": 43, "probeInterval": 3558}, + "stationIp": "10.0.0.1", + "stationName": "name", + "stationNetwork": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork", + "stationPort": 62695, + }, + }, + "tags": {"key": "value"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_delete.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_delete.py new file mode 100644 index 000000000000..5ac6e0419f14 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_delete.py @@ -0,0 +1,41 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.network_monitors.begin_delete( + resource_group_name="rgmanagednetworkfabric", + network_monitor_name="example-monitor", + ).result() + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_get.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_get.py new file mode 100644 index 000000000000..621b40155e6d --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_get.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.get( + resource_group_name="example-rg", + network_monitor_name="example-monitor", + ) + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_resource_group.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_resource_group.py new file mode 100644 index 000000000000..c431ec546bd9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_resource_group.py @@ -0,0 +1,42 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_list_by_resource_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.list_by_resource_group( + resource_group_name="example-rg", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_ListByResourceGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_subscription.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_subscription.py new file mode 100644 index 000000000000..e564f4d0bd18 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_list_by_subscription.py @@ -0,0 +1,40 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_list_by_subscription.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_ListBySubscription.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update.py new file mode 100644 index 000000000000..9e8e412e9b02 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update.py @@ -0,0 +1,64 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.begin_update( + resource_group_name="example-rg", + network_monitor_name="example-monitor", + body={ + "properties": { + "bmpConfiguration": { + "exportPolicy": "Pre-Policy", + "exportPolicyConfiguration": {"exportPolicies": ["Pre-Policy"]}, + "monitoredAddressFamilies": ["ipv4Unicast"], + "monitoredNetworks": [ + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" + ], + "scopeResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", + "stationConfigurationState": "Enabled", + "stationConnectionMode": "Active", + "stationConnectionProperties": {"keepaliveIdleTime": 49, "probeCount": 43, "probeInterval": 3558}, + "stationIp": "10.0.0.1", + "stationName": "name", + "stationNetwork": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain/internalNetworks/example-internalnetwork", + "stationPort": 64685, + } + }, + "tags": {"key": "value"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update_administrative_state.py new file mode 100644 index 000000000000..d1982b066e17 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_monitors_update_administrative_state.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_monitors_update_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_monitors.begin_update_administrative_state( + resource_group_name="example-rg", + network_monitor_name="example-monitor", + body={"resourceIds": [""], "state": "Enable"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkMonitors_UpdateAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create.py similarity index 80% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create.py index 11bc3c05c33c..3f8b36d2c53a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_create_maximum_set_gen.py + python network_packet_brokers_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,23 +28,24 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_packet_brokers.begin_create( resource_group_name="example-rg", network_packet_broker_name="example-networkPacketBroker", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastuseuap", "properties": { "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric" }, - "tags": {"key2806": "key"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete.py index eeded96ff885..8de03e3546a2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_delete_maximum_set_gen.py + python network_packet_brokers_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_packet_brokers.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get.py index 5124c727a79a..f3f97bb4ea85 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_get_maximum_set_gen.py + python network_packet_brokers_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_packet_brokers.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group.py index 49af3910327e..b4abd7e6dd9d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_list_by_resource_group_maximum_set_gen.py + python network_packet_brokers_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_packet_brokers.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription.py index 6c3ab9682aab..a84ca7ec96ff 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_list_by_subscription_maximum_set_gen.py + python network_packet_brokers_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_packet_brokers.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update.py index 796771ea41b1..6ac7f957068d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_packet_brokers_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_packet_brokers_update_maximum_set_gen.py + python network_packet_brokers_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_packet_brokers.begin_update( resource_group_name="example-rg", network_packet_broker_name="example-networkPacketBroker", - body={"tags": {"key8772": "1234"}}, + body={"identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, "tags": {"keyId": "keyValue"}}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkPacketBrokers_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create.py similarity index 82% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create.py index 28bbf3f468c0..3401098cdd8f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_create_maximum_set_gen.py + python network_racks_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +28,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_racks.begin_create( @@ -41,12 +41,12 @@ def main(): "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric", "networkRackType": "Aggregate", }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete.py index 22cb81c39633..11a5e45dafbf 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_delete_maximum_set_gen.py + python network_racks_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_racks.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get.py index 18a1bb23982f..999a6cc51466 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_get_maximum_set_gen.py + python network_racks_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_racks.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group.py index c3bd1d865251..ff4d6d855503 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_list_by_resource_group_maximum_set_gen.py + python network_racks_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_racks.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription.py index 72a8d731ad47..3e8f65b8f07d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_list_by_subscription_maximum_set_gen.py + python network_racks_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_racks.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update.py index d079208429f3..62d0663d2fe2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_racks_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_racks_update_maximum_set_gen.py + python network_racks_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_racks.begin_update( resource_group_name="example-rg", network_rack_name="example-rack", - body={"tags": {"keyID": "keyValue"}}, + body={"tags": {"keyId": "keyValue"}}, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkRacks_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create.py index a381f4776d22..1073e1be60b9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_create_maximum_set_gen.py + python network_tap_rules_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,29 +28,33 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.begin_create( resource_group_name="example-rg", network_tap_rule_name="example-tapRule", body={ - "location": "eastus", + "identity": {"type": "UserAssigned", "userAssignedIdentities": {"key872": {}}}, + "location": "eastuseuap", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "configurationType": "File", "dynamicMatchConfigurations": [ { "ipGroups": [ - {"ipAddressType": "IPv4", "ipPrefixes": ["10.10.10.10/30"], "name": "example-ipGroup1"} + {"ipAddressType": "IPv4", "ipPrefixes": ["10.20.3.1/20"], "name": "example-ipGroup"} ], - "portGroups": [ - {"name": "example-portGroup1", "ports": ["100-200"]}, - {"name": "example-portGroup2", "ports": ["900", "1000-2000"]}, - ], - "vlanGroups": [{"name": "exmaple-vlanGroup", "vlans": ["10", "100-200"]}], + "portGroups": [{"name": "example-portGroup", "ports": ["100-200"]}], + "vlanGroups": [{"name": "example-vlanGroup", "vlans": ["20-30"]}], } ], + "globalNetworkTapRuleActions": {"enableCount": "True", "truncate": "truncate-name"}, + "identitySelector": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + }, "matchConfigurations": [ { "actions": [ @@ -68,7 +72,7 @@ def main(): "encapsulationType": "None", "ipCondition": { "ipGroupNames": ["example-ipGroup"], - "ipPrefixValues": ["10.10.10.10/20"], + "ipPrefixValues": ["10.20.20.20/12"], "prefixType": "Prefix", "type": "SourceIP", }, @@ -80,9 +84,9 @@ def main(): }, "protocolTypes": ["TCP"], "vlanMatchCondition": { - "innerVlans": ["11-20"], - "vlanGroupNames": ["exmaple-vlanGroup"], - "vlans": ["10"], + "innerVlans": ["30"], + "vlanGroupNames": ["example-vlanGroup"], + "vlans": ["20-30"], }, } ], @@ -93,12 +97,12 @@ def main(): "pollingIntervalInSeconds": 30, "tapRulesUrl": "https://microsoft.com/a", }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete.py index e7a01bede0eb..8fcf0f21f068 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_delete_maximum_set_gen.py + python network_tap_rules_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_tap_rules.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get.py index 25dc88f61dc3..eebbb7950fa2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_get_maximum_set_gen.py + python network_tap_rules_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group.py index 7b509cf95378..9587656ba37b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_list_by_resource_group_maximum_set_gen.py + python network_tap_rules_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription.py index bbc5bb7759ef..1a2b4e7b7479 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_list_by_subscription_maximum_set_gen.py + python network_tap_rules_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync.py index 27b115236f48..7c07f1a103c2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_resync.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_resync_maximum_set_gen.py + python network_tap_rules_resync.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.begin_resync( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Resync_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_Resync.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update.py index 74f9eea63c0d..d2891863369c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_update_maximum_set_gen.py + python network_tap_rules_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,25 +28,31 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.begin_update( resource_group_name="example-rg", network_tap_rule_name="example-tapRule", body={ + "identity": {"type": "UserAssigned", "userAssignedIdentities": {"key872": {}}}, "properties": { "annotation": "annotation", "configurationType": "File", "dynamicMatchConfigurations": [ { "ipGroups": [ - {"ipAddressType": "IPv4", "ipPrefixes": ["10.10.10.10/30"], "name": "example-ipGroup1"} + {"ipAddressType": "IPv4", "ipPrefixes": ["10.20.3.1/20"], "name": "example-ipGroup"} ], - "portGroups": [{"name": "example-portGroup1", "ports": ["100-200"]}], - "vlanGroups": [{"name": "exmaple-vlanGroup", "vlans": ["10", "100-200"]}], + "portGroups": [{"name": "example-portGroup", "ports": ["100-200"]}], + "vlanGroups": [{"name": "example-vlanGroup", "vlans": ["20-30"]}], } ], + "globalNetworkTapRuleActions": {"enableCount": "True", "truncate": "truncate-name"}, + "identitySelector": { + "identityType": "UserAssignedIdentity", + "userAssignedIdentityResourceId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/example-identity", + }, "matchConfigurations": [ { "actions": [ @@ -55,7 +61,7 @@ def main(): "isTimestampEnabled": "True", "matchConfigurationName": "match1", "truncate": "100", - "type": "Goto", + "type": "Drop", } ], "ipAddressType": "IPv4", @@ -64,7 +70,7 @@ def main(): "encapsulationType": "None", "ipCondition": { "ipGroupNames": ["example-ipGroup"], - "ipPrefixValues": ["10.10.10.10/20"], + "ipPrefixValues": ["10.20.20.20/12"], "prefixType": "Prefix", "type": "SourceIP", }, @@ -76,9 +82,9 @@ def main(): }, "protocolTypes": ["TCP"], "vlanMatchCondition": { - "innerVlans": ["11-20"], - "vlanGroupNames": ["exmaple-vlanGroup"], - "vlans": ["10"], + "innerVlans": ["30"], + "vlanGroupNames": ["example-vlanGroup"], + "vlans": ["20-30"], }, } ], @@ -88,12 +94,12 @@ def main(): ], "tapRulesUrl": "https://microsoft.com/amdsdx", }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state.py index f3007d085567..4dddb3baeb97 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_update_administrative_state.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_update_administrative_state_maximum_set_gen.py + python network_tap_rules_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +28,22 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.begin_update_administrative_state( resource_group_name="example-rg", network_tap_rule_name="example-tapRule", - body={"resourceIds": [""], "state": "Enable"}, + body={ + "resourceIds": [ + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-tapRule" + ], + "state": "Enable", + }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration.py index f8f5abf24eb6..2fb14043232c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_tap_rules_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_tap_rules_validate_configuration_maximum_set_gen.py + python network_tap_rules_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_tap_rules.begin_validate_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTapRules_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create.py similarity index 88% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create.py index 327095836953..7b271ba9cbca 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_create_maximum_set_gen.py + python network_taps_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,15 +28,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.begin_create( resource_group_name="example-rg", network_tap_name="example-networkTap", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key3673": {}}}, "location": "eastuseuap", "properties": { + "administrativeState": "Enabled", "annotation": "annotation", "destinations": [ { @@ -55,12 +57,12 @@ def main(): "networkPacketBrokerId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker", "pollingType": "Pull", }, - "tags": {"key6024": "1234"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete.py index 084702764e17..cbdc2664be83 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_delete_maximum_set_gen.py + python network_taps_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_taps.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get.py index dae1d81d60e1..5c8c9b626b4d 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_get_maximum_set_gen.py + python network_taps_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group.py index 636201f639e4..f6aaec9c170b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_list_by_resource_group_maximum_set_gen.py + python network_taps_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription.py index a9c7455ba9b1..a0da0b13bf21 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_list_by_subscription_maximum_set_gen.py + python network_taps_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync.py index 503585b5fa70..3fad49b98037 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_resync.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_resync_maximum_set_gen.py + python network_taps_resync.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.begin_resync( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Resync_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_Resync.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update.py similarity index 87% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update.py index d29b9f670fdd..b9360b0e2c9e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_update_maximum_set_gen.py + python network_taps_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,13 +28,14 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.begin_update( resource_group_name="example-rg", network_tap_name="example-networkTap", body={ + "identity": {"type": "None", "userAssignedIdentities": {"key8793": {}}}, "properties": { "annotation": "annotation1", "destinations": [ @@ -53,12 +54,12 @@ def main(): ], "pollingType": "Pull", }, - "tags": {"key6024": "1234"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state.py index 9c1cfea5e0ac..21731f7b1b65 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_taps_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_taps_update_administrative_state_maximum_set_gen.py + python network_taps_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_taps.begin_update_administrative_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkTaps_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create.py index b9c6d8479f72..00c805b49050 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_create_maximum_set_gen.py + python network_to_network_interconnects_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,15 +28,19 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.begin_create( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", network_to_network_interconnect_name="example-nni", body={ "properties": { + "conditionalDefaultRouteConfiguration": { + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1/24"}], + "ipv6Routes": [{"nextHop": ["fe01::1"], "prefix": "fe08:00/64"}], + }, "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "exportRoutePolicy": { "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", @@ -54,20 +58,29 @@ def main(): ], "mtu": 1500, }, + "microBfdState": "Enabled", "nniType": "CE", "npbStaticRouteConfiguration": { - "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 25}, - "ipv4Routes": [{"nextHop": ["21.20.20.20"], "prefix": "20.0.0.12/30"}], - "ipv6Routes": [{"nextHop": ["4FFE:FFFF:0:CD30::ac"], "prefix": "3FFE:FFFF:0:CD30::ac/127"}], + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], + "ipv6Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], }, "optionBLayer3Configuration": { + "bmpConfiguration": {"configurationState": "Enabled"}, + "peLoopbackIpAddress": ["10.0.0.1"], "peerASN": 61234, + "prefixLimits": [{"maximumRoutes": 24}], "primaryIpv4Prefix": "10.0.0.12/30", "primaryIpv6Prefix": "4FFE:FFFF:0:CD30::a8/127", "secondaryIpv4Prefix": "40.0.0.14/30", "secondaryIpv6Prefix": "6FFE:FFFF:0:CD30::ac/127", "vlanId": 1234, }, + "staticRouteConfiguration": { + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "jffgck"}], + "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], + }, "useOptionB": "True", } }, @@ -75,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete.py index fd3134dd7ee7..52a56704fd72 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_delete_maximum_set_gen.py + python network_to_network_interconnects_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,16 +27,16 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.network_to_network_interconnects.begin_delete( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", network_to_network_interconnect_name="example-nni", ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get.py index 0a0c65915a3d..03fe723996ed 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_get_maximum_set_gen.py + python network_to_network_interconnects_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.get( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", network_to_network_interconnect_name="example-nni", ) print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric.py index d512bd10b97e..f9b2b8243580 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_list_by_network_fabric.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_list_by_network_fabric_maximum_set_gen.py + python network_to_network_interconnects_list_by_network_fabric.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,17 +27,17 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.list_by_network_fabric( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", ) for item in response: print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_ListByNetworkFabric.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update.py index e528569df1e6..df1547b1ba57 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_update_maximum_set_gen.py + python network_to_network_interconnects_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,23 +28,23 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.begin_update( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", network_to_network_interconnect_name="example-nni", body={ "properties": { "egressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "exportRoutePolicy": { - "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", - "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", + "exportIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + "exportIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", }, "importRoutePolicy": { - "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", - "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1", + "importIpv4RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", + "importIpv6RoutePolicyId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy", }, "ingressAclId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl", "layer2Configuration": { @@ -53,25 +53,34 @@ def main(): ], "mtu": 1500, }, + "microBfdState": "Enabled", "npbStaticRouteConfiguration": { - "bfdConfiguration": {"intervalInMilliSeconds": 310, "multiplier": 15}, - "ipv4Routes": [{"nextHop": ["21.20.20.10"], "prefix": "20.0.0.11/30"}], - "ipv6Routes": [{"nextHop": ["5FFE:FFFF:0:CD30::ac"], "prefix": "4FFE:FFFF:0:CD30::ac/127"}], + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1/24"}], + "ipv6Routes": [{"nextHop": ["fe80::1"], "prefix": "fe80::/64"}], }, "optionBLayer3Configuration": { + "bmpConfiguration": {"configurationState": "Enabled"}, + "peLoopbackIpAddress": ["10.0.0.1"], "peerASN": 2345, + "prefixLimits": [{"maximumRoutes": 1}], "primaryIpv4Prefix": "20.0.0.12/29", "primaryIpv6Prefix": "4FFE:FFFF:0:CD30::a8/127", "secondaryIpv4Prefix": "20.0.0.14/29", "secondaryIpv6Prefix": "6FFE:FFFF:0:CD30::ac/127", "vlanId": 1235, }, + "staticRouteConfiguration": { + "bfdConfiguration": {"intervalInMilliSeconds": 300, "multiplier": 10}, + "ipv4Routes": [{"nextHop": ["10.0.0.1"], "prefix": "10.0.0.1"}], + "ipv6Routes": [{"nextHop": ["3ffe::1"], "prefix": "2fff::/64"}], + }, } }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state.py similarity index 73% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state.py index 2a01e39e58b3..99d696a26279 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_administrative_state.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_update_administrative_state_maximum_set_gen.py + python network_to_network_interconnects_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,18 +28,23 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.begin_update_administrative_state( resource_group_name="example-rg", - network_fabric_name="example-fabric", + network_fabric_name="example-nf", network_to_network_interconnect_name="example-nni", - body={"resourceIds": [""], "state": "Enable"}, + body={ + "resourceIds": [ + "/subscriptions/0000ABCD-0A0B-0000-0000-000000ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-nf/networkToNetworkInterconnects/example-nni" + ], + "state": "Enable", + }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_bfd_administrative_state.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_bfd_administrative_state.py new file mode 100644 index 000000000000..425ac9fc5d1a --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_bfd_administrative_state.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-managednetworkfabric +# USAGE + python network_to_network_interconnects_update_bfd_administrative_state.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ManagedNetworkFabricMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.network_to_network_interconnects.begin_update_bfd_administrative_state( + resource_group_name="example-rg", + network_fabric_name="example-nf", + network_to_network_interconnect_name="example-nni", + body={"administrativeState": "Enable", "routeType": "Static"}, + ).result() + print(response) + + +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateBfdAdministrativeState.json +if __name__ == "__main__": + main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state.py similarity index 77% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state.py index 4dc544c9e3ab..469400e38e54 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/network_to_network_interconnects_update_npb_static_route_bfd_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python network_to_network_interconnects_update_npb_static_route_bfd_administrative_state_maximum_set_gen.py + python network_to_network_interconnects_update_npb_static_route_bfd_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.network_to_network_interconnects.begin_update_npb_static_route_bfd_administrative_state( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/operations_list.py similarity index 81% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/operations_list.py index 4a6f03e9632e..d74cf3011503 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/list_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/operations_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python list_operations.py + python operations_list.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ListOperations.json +# x-ms-original-file: 2025-07-15/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration.py index 228736c37a80..d3d7e3fc56f9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_commit_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_commit_configuration_maximum_set_gen.py + python route_policies_commit_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.begin_commit_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_CommitConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_CommitConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create.py similarity index 92% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create.py index 20bae1359bd9..d5a545318865 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_create.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_create_maximum_set_gen.py + python route_policies_create.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +28,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.begin_create( @@ -38,8 +38,9 @@ def main(): "location": "eastus", "properties": { "addressFamilyType": "IPv4", + "administrativeState": "Enabled", "annotation": "annotation", - "defaultAction": "Deny", + "defaultAction": "Permit", "networkFabricId": "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric", "statements": [ { @@ -96,12 +97,12 @@ def main(): } ], }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Create_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete.py index ed53eec66be7..0d0bc8f7faba 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_delete_maximum_set_gen.py + python route_policies_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) client.route_policies.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get.py index c5ae5adc4263..5b4b6222ba49 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_get_maximum_set_gen.py + python route_policies_get.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group.py index d9d99f85e4ef..264949e40c2e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_list_by_resource_group_maximum_set_gen.py + python route_policies_list_by_resource_group.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription.py similarity index 74% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription.py index 8dfde22405be..db867f37df66 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_list_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_list_by_subscription_maximum_set_gen.py + python route_policies_list_by_subscription.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update.py similarity index 92% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update.py index 56cbdcd9dee1..b1b270219064 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_update_maximum_set_gen.py + python route_policies_update.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +28,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.begin_update( @@ -36,7 +36,7 @@ def main(): route_policy_name="example-routePolicy", body={ "properties": { - "defaultAction": "Deny", + "defaultAction": "Permit", "statements": [ { "action": { @@ -92,12 +92,12 @@ def main(): } ], }, - "tags": {"keyID": "keyValue"}, + "tags": {"keyId": "keyValue"}, }, ).result() print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Update_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state.py similarity index 76% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state.py index c1b702da582d..6679b6ea2681 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_update_administrative_state.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_update_administrative_state_maximum_set_gen.py + python route_policies_update_administrative_state.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.begin_update_administrative_state( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_UpdateAdministrativeState.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration.py similarity index 75% rename from sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py rename to sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration.py index fc21ccee4cb8..ed3d211479c4 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration_maximum_set_gen.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_samples/route_policies_validate_configuration.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -16,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-managednetworkfabric # USAGE - python route_policies_validate_configuration_maximum_set_gen.py + python route_policies_validate_configuration.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -28,7 +27,7 @@ def main(): client = ManagedNetworkFabricMgmtClient( credential=DefaultAzureCredential(), - subscription_id="1234ABCD-0A1B-1234-5678-123456ABCDEF", + subscription_id="SUBSCRIPTION_ID", ) response = client.route_policies.begin_validate_configuration( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json +# x-ms-original-file: 2025-07-15/RoutePolicies_ValidateConfiguration.json if __name__ == "__main__": main() diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py index 4addcddded8d..4e2c1fa42445 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py index 7daa3d5bf9fc..c7ab628e2301 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtAccessControlListsOperations(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_access_control_lists_get(self, resource_group): + response = self.client.access_control_lists.get( + resource_group_name=resource_group.name, + access_control_list_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_access_control_lists_begin_create(self, resource_group): @@ -26,59 +37,101 @@ def test_access_control_lists_begin_create(self, resource_group): access_control_list_name="str", body={ "location": "str", - "aclsUrl": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "configurationType": "str", - "defaultAction": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "id": "str", - "lastSyncedTime": "2020-02-20 00:00:00", - "matchConfigurations": [ - { - "actions": [{"counterName": "str", "type": "str"}], - "ipAddressType": "str", - "matchConditions": [ - { - "dscpMarkings": ["str"], - "etherTypes": ["str"], - "fragments": ["str"], - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "configurationType": "str", + "aclType": "str", + "aclsUrl": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "controlPlaneAclConfiguration": [ + { + "ipAddressType": "str", + "matchConfigurations": [ + { + "action": {"remarkComment": "str", "type": "str"}, + "matchCondition": { + "flags": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": {"destinationIpPrefix": "str", "sourceIpPrefix": "str"}, + "portCondition": { + "destinationPorts": {"portMatchType": "str", "ports": ["str"]}, + "sourcePorts": {"portMatchType": "str", "ports": ["str"]}, + }, + "protocolTypes": "str", + "ttlMatchCondition": {"ttlMatchType": "str", "ttlValue": "str"}, + }, + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + } + ], + "defaultAction": "str", + "deviceRole": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalAccessControlListActions": {"enableCount": "str"}, + "lastOperation": {"details": "str"}, + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "counterName": "str", + "policeRateConfiguration": { + "bitRate": {"rate": 0, "unit": "str"}, + "burstSize": {"size": 0, "unit": "str"}, + }, + "remarkComment": "str", "type": "str", - }, - "ipLengths": ["str"], - "portCondition": { - "layer4Protocol": "str", - "flags": ["str"], - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "ttlValues": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolNeighbors": ["str"], + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "networkFabricIds": ["str"], + "provisioningState": "str", + }, + "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -90,24 +143,11 @@ def test_access_control_lists_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_access_control_lists_get(self, resource_group): - response = self.client.access_control_lists.get( - resource_group_name=resource_group.name, - access_control_list_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_access_control_lists_begin_update(self, resource_group): @@ -115,56 +155,95 @@ def test_access_control_lists_begin_update(self, resource_group): resource_group_name=resource_group.name, access_control_list_name="str", body={ - "aclsUrl": "str", - "annotation": "str", - "configurationType": "str", - "defaultAction": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "matchConfigurations": [ - { - "actions": [{"counterName": "str", "type": "str"}], - "ipAddressType": "str", - "matchConditions": [ - { - "dscpMarkings": ["str"], - "etherTypes": ["str"], - "fragments": ["str"], - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "aclType": "str", + "aclsUrl": "str", + "annotation": "str", + "configurationType": "str", + "controlPlaneAclConfiguration": [ + { + "ipAddressType": "str", + "matchConfigurations": [ + { + "action": {"remarkComment": "str", "type": "str"}, + "matchCondition": { + "flags": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": {"destinationIpPrefix": "str", "sourceIpPrefix": "str"}, + "portCondition": { + "destinationPorts": {"portMatchType": "str", "ports": ["str"]}, + "sourcePorts": {"portMatchType": "str", "ports": ["str"]}, + }, + "protocolTypes": "str", + "ttlMatchCondition": {"ttlMatchType": "str", "ttlValue": "str"}, + }, + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + } + ], + "defaultAction": "str", + "deviceRole": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalAccessControlListActions": {"enableCount": "str"}, + "matchConfigurations": [ + { + "actions": [ + { + "counterName": "str", + "policeRateConfiguration": { + "bitRate": {"rate": 0, "unit": "str"}, + "burstSize": {"size": 0, "unit": "str"}, + }, + "remarkComment": "str", "type": "str", - }, - "ipLengths": ["str"], - "portCondition": { - "layer4Protocol": "str", - "flags": ["str"], - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "ttlValues": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "flags": ["str"], + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolNeighbors": ["str"], + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -176,7 +255,6 @@ def test_access_control_lists_begin_delete(self, resource_group): response = self.client.access_control_lists.begin_delete( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -187,7 +265,6 @@ def test_access_control_lists_begin_delete(self, resource_group): def test_access_control_lists_list_by_resource_group(self, resource_group): response = self.client.access_control_lists.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -196,9 +273,7 @@ def test_access_control_lists_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_access_control_lists_list_by_subscription(self, resource_group): - response = self.client.access_control_lists.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.access_control_lists.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -210,7 +285,6 @@ def test_access_control_lists_begin_update_administrative_state(self, resource_g resource_group_name=resource_group.name, access_control_list_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -222,7 +296,6 @@ def test_access_control_lists_begin_resync(self, resource_group): response = self.client.access_control_lists.begin_resync( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -234,7 +307,6 @@ def test_access_control_lists_begin_validate_configuration(self, resource_group) response = self.client.access_control_lists.begin_validate_configuration( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py index 9ff115567d61..693ff91b38e1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_access_control_lists_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtAccessControlListsOperationsAsync(AzureMgmtRec def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_access_control_lists_get(self, resource_group): + response = await self.client.access_control_lists.get( + resource_group_name=resource_group.name, + access_control_list_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_access_control_lists_begin_create(self, resource_group): @@ -28,59 +39,101 @@ async def test_access_control_lists_begin_create(self, resource_group): access_control_list_name="str", body={ "location": "str", - "aclsUrl": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "configurationType": "str", - "defaultAction": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "id": "str", - "lastSyncedTime": "2020-02-20 00:00:00", - "matchConfigurations": [ - { - "actions": [{"counterName": "str", "type": "str"}], - "ipAddressType": "str", - "matchConditions": [ - { - "dscpMarkings": ["str"], - "etherTypes": ["str"], - "fragments": ["str"], - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "configurationType": "str", + "aclType": "str", + "aclsUrl": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "controlPlaneAclConfiguration": [ + { + "ipAddressType": "str", + "matchConfigurations": [ + { + "action": {"remarkComment": "str", "type": "str"}, + "matchCondition": { + "flags": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": {"destinationIpPrefix": "str", "sourceIpPrefix": "str"}, + "portCondition": { + "destinationPorts": {"portMatchType": "str", "ports": ["str"]}, + "sourcePorts": {"portMatchType": "str", "ports": ["str"]}, + }, + "protocolTypes": "str", + "ttlMatchCondition": {"ttlMatchType": "str", "ttlValue": "str"}, + }, + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + } + ], + "defaultAction": "str", + "deviceRole": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalAccessControlListActions": {"enableCount": "str"}, + "lastOperation": {"details": "str"}, + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "counterName": "str", + "policeRateConfiguration": { + "bitRate": {"rate": 0, "unit": "str"}, + "burstSize": {"size": 0, "unit": "str"}, + }, + "remarkComment": "str", "type": "str", - }, - "ipLengths": ["str"], - "portCondition": { - "layer4Protocol": "str", - "flags": ["str"], - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "ttlValues": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "layer4Protocol": "str", + "flags": ["str"], + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolNeighbors": ["str"], + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "networkFabricIds": ["str"], + "provisioningState": "str", + }, + "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -92,25 +145,12 @@ async def test_access_control_lists_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_access_control_lists_get(self, resource_group): - response = await self.client.access_control_lists.get( - resource_group_name=resource_group.name, - access_control_list_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_access_control_lists_begin_update(self, resource_group): @@ -119,56 +159,95 @@ async def test_access_control_lists_begin_update(self, resource_group): resource_group_name=resource_group.name, access_control_list_name="str", body={ - "aclsUrl": "str", - "annotation": "str", - "configurationType": "str", - "defaultAction": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "matchConfigurations": [ - { - "actions": [{"counterName": "str", "type": "str"}], - "ipAddressType": "str", - "matchConditions": [ - { - "dscpMarkings": ["str"], - "etherTypes": ["str"], - "fragments": ["str"], - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "aclType": "str", + "aclsUrl": "str", + "annotation": "str", + "configurationType": "str", + "controlPlaneAclConfiguration": [ + { + "ipAddressType": "str", + "matchConfigurations": [ + { + "action": {"remarkComment": "str", "type": "str"}, + "matchCondition": { + "flags": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": {"destinationIpPrefix": "str", "sourceIpPrefix": "str"}, + "portCondition": { + "destinationPorts": {"portMatchType": "str", "ports": ["str"]}, + "sourcePorts": {"portMatchType": "str", "ports": ["str"]}, + }, + "protocolTypes": "str", + "ttlMatchCondition": {"ttlMatchType": "str", "ttlValue": "str"}, + }, + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + } + ], + "defaultAction": "str", + "deviceRole": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalAccessControlListActions": {"enableCount": "str"}, + "matchConfigurations": [ + { + "actions": [ + { + "counterName": "str", + "policeRateConfiguration": { + "bitRate": {"rate": 0, "unit": "str"}, + "burstSize": {"size": 0, "unit": "str"}, + }, + "remarkComment": "str", "type": "str", - }, - "ipLengths": ["str"], - "portCondition": { - "layer4Protocol": "str", - "flags": ["str"], - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "ttlValues": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "dscpMarkings": ["str"], + "etherTypes": ["str"], + "fragments": ["str"], + "icmpConfiguration": {"icmpTypes": ["str"]}, + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "ipLengths": ["str"], + "portCondition": { + "flags": ["str"], + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolNeighbors": ["str"], + "protocolTypes": ["str"], + "ttlValues": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -182,7 +261,6 @@ async def test_access_control_lists_begin_delete(self, resource_group): await self.client.access_control_lists.begin_delete( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -194,7 +272,6 @@ async def test_access_control_lists_begin_delete(self, resource_group): async def test_access_control_lists_list_by_resource_group(self, resource_group): response = self.client.access_control_lists.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -203,9 +280,7 @@ async def test_access_control_lists_list_by_resource_group(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_access_control_lists_list_by_subscription(self, resource_group): - response = self.client.access_control_lists.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.access_control_lists.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -218,7 +293,6 @@ async def test_access_control_lists_begin_update_administrative_state(self, reso resource_group_name=resource_group.name, access_control_list_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -232,7 +306,6 @@ async def test_access_control_lists_begin_resync(self, resource_group): await self.client.access_control_lists.begin_resync( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -246,7 +319,6 @@ async def test_access_control_lists_begin_validate_configuration(self, resource_ await self.client.access_control_lists.begin_validate_configuration( resource_group_name=resource_group.name, access_control_list_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py index 91f6a4d5a754..bfd6745c05de 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,18 @@ class TestManagedNetworkFabricMgmtExternalNetworksOperations(AzureMgmtRecordedTe def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_get(self, resource_group): + response = self.client.external_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_external_networks_begin_create(self, resource_group): @@ -26,45 +38,65 @@ def test_external_networks_begin_create(self, resource_group): l3_isolation_domain_name="str", external_network_name="str", body={ - "peeringOption": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "name": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "peeringOption": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"configurationState": "str"}, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", }, - "egressAclId": "str", - "fabricASN": 0, - "ingressAclId": "str", - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, }, - "provisioningState": "str", + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -75,25 +107,11 @@ def test_external_networks_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_external_networks_get(self, resource_group): - response = self.client.external_networks.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - external_network_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_external_networks_begin_update(self, resource_group): @@ -102,42 +120,59 @@ def test_external_networks_begin_update(self, resource_group): l3_isolation_domain_name="str", external_network_name="str", body={ - "annotation": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "annotation": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"configurationState": "str"}, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", + "vlanId": 0, }, - "egressAclId": "str", - "fabricASN": 0, - "ingressAclId": "str", - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, - }, - "peeringOption": "str", + "peeringOption": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + } }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -150,7 +185,6 @@ def test_external_networks_begin_delete(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", external_network_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -162,7 +196,6 @@ def test_external_networks_list_by_l3_isolation_domain(self, resource_group): response = self.client.external_networks.list_by_l3_isolation_domain( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -176,7 +209,6 @@ def test_external_networks_begin_update_administrative_state(self, resource_grou l3_isolation_domain_name="str", external_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -190,7 +222,19 @@ def test_external_networks_begin_update_static_route_bfd_administrative_state(se l3_isolation_domain_name="str", external_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_external_networks_begin_update_bfd_administrative_state(self, resource_group): + response = self.client.external_networks.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"administrativeState": "str", "routeType": "str"}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py index 0a52c756d64c..0cb5eb7671d6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_external_networks_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,18 @@ class TestManagedNetworkFabricMgmtExternalNetworksOperationsAsync(AzureMgmtRecor def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_get(self, resource_group): + response = await self.client.external_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_external_networks_begin_create(self, resource_group): @@ -28,45 +40,65 @@ async def test_external_networks_begin_create(self, resource_group): l3_isolation_domain_name="str", external_network_name="str", body={ - "peeringOption": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "name": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "peeringOption": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"configurationState": "str"}, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", }, - "egressAclId": "str", - "fabricASN": 0, - "ingressAclId": "str", - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, + }, + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, }, - "provisioningState": "str", + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -77,26 +109,12 @@ async def test_external_networks_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_external_networks_get(self, resource_group): - response = await self.client.external_networks.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - external_network_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_external_networks_begin_update(self, resource_group): @@ -106,42 +124,59 @@ async def test_external_networks_begin_update(self, resource_group): l3_isolation_domain_name="str", external_network_name="str", body={ - "annotation": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "annotation": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"configurationState": "str"}, + "egressAclId": "str", + "fabricASN": 0, + "ingressAclId": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", + "vlanId": 0, }, - "egressAclId": "str", - "fabricASN": 0, - "ingressAclId": "str", - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, - }, - "peeringOption": "str", + "peeringOption": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + } }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -156,7 +191,6 @@ async def test_external_networks_begin_delete(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", external_network_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -169,7 +203,6 @@ async def test_external_networks_list_by_l3_isolation_domain(self, resource_grou response = self.client.external_networks.list_by_l3_isolation_domain( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -184,7 +217,6 @@ async def test_external_networks_begin_update_administrative_state(self, resourc l3_isolation_domain_name="str", external_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -200,7 +232,21 @@ async def test_external_networks_begin_update_static_route_bfd_administrative_st l3_isolation_domain_name="str", external_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_external_networks_begin_update_bfd_administrative_state(self, resource_group): + response = await ( + await self.client.external_networks.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + external_network_name="str", + body={"administrativeState": "str", "routeType": "str"}, ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py index 250bf4627644..629186416955 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,18 @@ class TestManagedNetworkFabricMgmtInternalNetworksOperations(AzureMgmtRecordedTe def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_get(self, resource_group): + response = self.client.internal_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internal_networks_begin_create(self, resource_group): @@ -26,51 +38,80 @@ def test_internal_networks_begin_create(self, resource_group): l3_isolation_domain_name="str", internal_network_name="str", body={ - "vlanId": 0, - "administrativeState": "str", - "annotation": "str", - "bgpConfiguration": { - "allowAS": 2, - "allowASOverride": "str", + "properties": { + "vlanId": 0, + "administrativeState": "str", "annotation": "str", - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "bgpConfiguration": { + "peerASN": 0, + "allowAS": 0, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": { + "bmpConfigurationState": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "neighborIpExclusions": ["str"], + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", + }, + "configurationState": "str", + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "extension": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isMonitoringEnabled": "str", + "lastOperation": {"details": "str"}, + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "networkFabricId": "str", + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "extension": "str", + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "defaultRouteOriginate": "str", - "fabricASN": 0, - "ipv4ListenRangePrefixes": ["str"], - "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], - "ipv6ListenRangePrefixes": ["str"], - "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], - "peerASN": 0, }, - "configurationState": "str", - "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], - "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "extension": "NoExtension", "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "ingressAclId": "str", - "isMonitoringEnabled": "False", - "mtu": 1500, "name": "str", - "provisioningState": "str", - "staticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, - }, - "extension": "NoExtension", - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -81,25 +122,11 @@ def test_internal_networks_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_internal_networks_get(self, resource_group): - response = self.client.internal_networks.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - internal_network_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internal_networks_begin_update(self, resource_group): @@ -108,45 +135,67 @@ def test_internal_networks_begin_update(self, resource_group): l3_isolation_domain_name="str", internal_network_name="str", body={ - "annotation": "str", - "bgpConfiguration": { - "allowAS": 2, - "allowASOverride": "str", + "properties": { "annotation": "str", - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "bgpConfiguration": { + "allowAS": 0, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"bmpConfigurationState": "str", "neighborIpExclusions": ["str"]}, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "peerASN": 0, + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", }, - "defaultRouteOriginate": "str", - "fabricASN": 0, - "ipv4ListenRangePrefixes": ["str"], - "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], - "ipv6ListenRangePrefixes": ["str"], - "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], - "peerASN": 0, - }, - "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], - "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "ingressAclId": "str", - "isMonitoringEnabled": "False", - "mtu": 1500, - "staticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isMonitoringEnabled": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + } }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -159,7 +208,6 @@ def test_internal_networks_begin_delete(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", internal_network_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -171,7 +219,6 @@ def test_internal_networks_list_by_l3_isolation_domain(self, resource_group): response = self.client.internal_networks.list_by_l3_isolation_domain( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -185,7 +232,6 @@ def test_internal_networks_begin_update_administrative_state(self, resource_grou l3_isolation_domain_name="str", internal_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -198,8 +244,7 @@ def test_internal_networks_begin_update_bgp_administrative_state(self, resource_ resource_group_name=resource_group.name, l3_isolation_domain_name="str", internal_network_name="str", - body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + body={"administrativeState": "str", "neighborAddress": "str"}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -213,7 +258,19 @@ def test_internal_networks_begin_update_static_route_bfd_administrative_state(se l3_isolation_domain_name="str", internal_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internal_networks_begin_update_bfd_administrative_state(self, resource_group): + response = self.client.internal_networks.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"administrativeState": "str", "neighborAddress": "str", "routeType": "str"}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py index 1fd71ef0257e..d28e54abec79 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internal_networks_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,18 @@ class TestManagedNetworkFabricMgmtInternalNetworksOperationsAsync(AzureMgmtRecor def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_get(self, resource_group): + response = await self.client.internal_networks.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internal_networks_begin_create(self, resource_group): @@ -28,51 +40,80 @@ async def test_internal_networks_begin_create(self, resource_group): l3_isolation_domain_name="str", internal_network_name="str", body={ - "vlanId": 0, - "administrativeState": "str", - "annotation": "str", - "bgpConfiguration": { - "allowAS": 2, - "allowASOverride": "str", + "properties": { + "vlanId": 0, + "administrativeState": "str", "annotation": "str", - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "bgpConfiguration": { + "peerASN": 0, + "allowAS": 0, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": { + "bmpConfigurationState": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "neighborIpExclusions": ["str"], + }, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", + }, + "configurationState": "str", + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "extension": "str", + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isMonitoringEnabled": "str", + "lastOperation": {"details": "str"}, + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "networkFabricId": "str", + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "extension": "str", + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "defaultRouteOriginate": "str", - "fabricASN": 0, - "ipv4ListenRangePrefixes": ["str"], - "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], - "ipv6ListenRangePrefixes": ["str"], - "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], - "peerASN": 0, }, - "configurationState": "str", - "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], - "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "extension": "NoExtension", "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "ingressAclId": "str", - "isMonitoringEnabled": "False", - "mtu": 1500, "name": "str", - "provisioningState": "str", - "staticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, - }, - "extension": "NoExtension", - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -83,26 +124,12 @@ async def test_internal_networks_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_internal_networks_get(self, resource_group): - response = await self.client.internal_networks.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - internal_network_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internal_networks_begin_update(self, resource_group): @@ -112,45 +139,67 @@ async def test_internal_networks_begin_update(self, resource_group): l3_isolation_domain_name="str", internal_network_name="str", body={ - "annotation": "str", - "bgpConfiguration": { - "allowAS": 2, - "allowASOverride": "str", + "properties": { "annotation": "str", - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "bgpConfiguration": { + "allowAS": 0, + "allowASOverride": "str", + "annotation": "str", + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "bmpConfiguration": {"bmpConfigurationState": "str", "neighborIpExclusions": ["str"]}, + "defaultRouteOriginate": "str", + "fabricASN": 0, + "ipv4ListenRangePrefixes": ["str"], + "ipv4NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "ipv6ListenRangePrefixes": ["str"], + "ipv6NeighborAddress": [ + { + "address": "str", + "bfdAdministrativeState": "str", + "bgpAdministrativeState": "str", + "configurationState": "str", + } + ], + "peerASN": 0, + "v4OverV6BgpSession": "str", + "v6OverV4BgpSession": "str", }, - "defaultRouteOriginate": "str", - "fabricASN": 0, - "ipv4ListenRangePrefixes": ["str"], - "ipv4NeighborAddress": [{"address": "str", "configurationState": "str"}], - "ipv6ListenRangePrefixes": ["str"], - "ipv6NeighborAddress": [{"address": "str", "configurationState": "str"}], - "peerASN": 0, - }, - "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], - "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "importRoutePolicyId": "str", - "ingressAclId": "str", - "isMonitoringEnabled": "False", - "mtu": 1500, - "staticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "connectedIPv4Subnets": [{"prefix": "str", "annotation": "str"}], + "connectedIPv6Subnets": [{"prefix": "str", "annotation": "str"}], + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isMonitoringEnabled": "str", + "mtu": 0, + "nativeIpv4PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, + "nativeIpv6PrefixLimit": { + "prefixLimits": [{"idleTimeExpiry": 0, "maximumRoutes": 0, "threshold": 0}] + }, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + } }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -165,7 +214,6 @@ async def test_internal_networks_begin_delete(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", internal_network_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -178,7 +226,6 @@ async def test_internal_networks_list_by_l3_isolation_domain(self, resource_grou response = self.client.internal_networks.list_by_l3_isolation_domain( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -193,7 +240,6 @@ async def test_internal_networks_begin_update_administrative_state(self, resourc l3_isolation_domain_name="str", internal_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -208,8 +254,7 @@ async def test_internal_networks_begin_update_bgp_administrative_state(self, res resource_group_name=resource_group.name, l3_isolation_domain_name="str", internal_network_name="str", - body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + body={"administrativeState": "str", "neighborAddress": "str"}, ) ).result() # call '.result()' to poll until service return final result @@ -225,7 +270,21 @@ async def test_internal_networks_begin_update_static_route_bfd_administrative_st l3_isolation_domain_name="str", internal_network_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internal_networks_begin_update_bfd_administrative_state(self, resource_group): + response = await ( + await self.client.internal_networks.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + internal_network_name="str", + body={"administrativeState": "str", "neighborAddress": "str", "routeType": "str"}, ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py index a0716b013f22..90e72e522f8c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtInternetGatewayRulesOperations(AzureMgmtRecord def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateway_rules_get(self, resource_group): + response = self.client.internet_gateway_rules.get( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateway_rules_begin_create(self, resource_group): @@ -26,12 +37,22 @@ def test_internet_gateway_rules_begin_create(self, resource_group): internet_gateway_rule_name="str", body={ "location": "str", - "ruleProperties": {"action": "str", "addressList": ["str"]}, - "annotation": "str", + "properties": { + "ruleProperties": { + "action": "str", + "addressList": ["str"], + "condition": "str", + "destinationAddressList": ["str"], + "headerAddressList": [{"addressList": ["str"], "headerName": "str"}], + "sourceAddressList": ["str"], + }, + "annotation": "str", + "internetGatewayIds": ["str"], + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, "id": "str", - "internetGatewayIds": ["str"], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -43,24 +64,11 @@ def test_internet_gateway_rules_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_internet_gateway_rules_get(self, resource_group): - response = self.client.internet_gateway_rules.get( - resource_group_name=resource_group.name, - internet_gateway_rule_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateway_rules_begin_update(self, resource_group): @@ -68,7 +76,6 @@ def test_internet_gateway_rules_begin_update(self, resource_group): resource_group_name=resource_group.name, internet_gateway_rule_name="str", body={"tags": {"str": "str"}}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,7 +87,6 @@ def test_internet_gateway_rules_begin_delete(self, resource_group): response = self.client.internet_gateway_rules.begin_delete( resource_group_name=resource_group.name, internet_gateway_rule_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -91,7 +97,6 @@ def test_internet_gateway_rules_begin_delete(self, resource_group): def test_internet_gateway_rules_list_by_resource_group(self, resource_group): response = self.client.internet_gateway_rules.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -100,9 +105,7 @@ def test_internet_gateway_rules_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateway_rules_list_by_subscription(self, resource_group): - response = self.client.internet_gateway_rules.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.internet_gateway_rules.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py index 86cb0a0978a7..9bf2ba4b6fab 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateway_rules_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtInternetGatewayRulesOperationsAsync(AzureMgmtR def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateway_rules_get(self, resource_group): + response = await self.client.internet_gateway_rules.get( + resource_group_name=resource_group.name, + internet_gateway_rule_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateway_rules_begin_create(self, resource_group): @@ -28,12 +39,22 @@ async def test_internet_gateway_rules_begin_create(self, resource_group): internet_gateway_rule_name="str", body={ "location": "str", - "ruleProperties": {"action": "str", "addressList": ["str"]}, - "annotation": "str", + "properties": { + "ruleProperties": { + "action": "str", + "addressList": ["str"], + "condition": "str", + "destinationAddressList": ["str"], + "headerAddressList": [{"addressList": ["str"], "headerName": "str"}], + "sourceAddressList": ["str"], + }, + "annotation": "str", + "internetGatewayIds": ["str"], + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, "id": "str", - "internetGatewayIds": ["str"], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -45,25 +66,12 @@ async def test_internet_gateway_rules_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_internet_gateway_rules_get(self, resource_group): - response = await self.client.internet_gateway_rules.get( - resource_group_name=resource_group.name, - internet_gateway_rule_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateway_rules_begin_update(self, resource_group): @@ -72,7 +80,6 @@ async def test_internet_gateway_rules_begin_update(self, resource_group): resource_group_name=resource_group.name, internet_gateway_rule_name="str", body={"tags": {"str": "str"}}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -86,7 +93,6 @@ async def test_internet_gateway_rules_begin_delete(self, resource_group): await self.client.internet_gateway_rules.begin_delete( resource_group_name=resource_group.name, internet_gateway_rule_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -98,7 +104,6 @@ async def test_internet_gateway_rules_begin_delete(self, resource_group): async def test_internet_gateway_rules_list_by_resource_group(self, resource_group): response = self.client.internet_gateway_rules.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -107,9 +112,7 @@ async def test_internet_gateway_rules_list_by_resource_group(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateway_rules_list_by_subscription(self, resource_group): - response = self.client.internet_gateway_rules.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.internet_gateway_rules.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py index 8ae9fa88a6d5..5e362af2f8d6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtInternetGatewaysOperations(AzureMgmtRecordedTe def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_internet_gateways_get(self, resource_group): + response = self.client.internet_gateways.get( + resource_group_name=resource_group.name, + internet_gateway_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateways_begin_create(self, resource_group): @@ -26,14 +37,19 @@ def test_internet_gateways_begin_create(self, resource_group): internet_gateway_name="str", body={ "location": "str", - "networkFabricControllerId": "str", - "annotation": "str", + "properties": { + "networkFabricControllerId": "str", + "annotation": "str", + "internetGatewayRuleId": "str", + "internetGatewayType": "str", + "ipv4Address": "str", + "lastOperation": {"details": "str"}, + "port": 0, + "provisioningState": "str", + "type": "str", + }, "id": "str", - "internetGatewayRuleId": "str", - "ipv4Address": "str", "name": "str", - "port": 0, - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -45,32 +61,18 @@ def test_internet_gateways_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_internet_gateways_get(self, resource_group): - response = self.client.internet_gateways.get( - resource_group_name=resource_group.name, - internet_gateway_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateways_begin_update(self, resource_group): response = self.client.internet_gateways.begin_update( resource_group_name=resource_group.name, internet_gateway_name="str", - body={"internetGatewayRuleId": "str", "tags": {"str": "str"}}, - api_version="2023-06-15", + body={"properties": {"internetGatewayRuleId": "str"}, "tags": {"str": "str"}}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,7 +84,6 @@ def test_internet_gateways_begin_delete(self, resource_group): response = self.client.internet_gateways.begin_delete( resource_group_name=resource_group.name, internet_gateway_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,7 +94,6 @@ def test_internet_gateways_begin_delete(self, resource_group): def test_internet_gateways_list_by_resource_group(self, resource_group): response = self.client.internet_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -102,9 +102,7 @@ def test_internet_gateways_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_internet_gateways_list_by_subscription(self, resource_group): - response = self.client.internet_gateways.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.internet_gateways.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py index fca436d6294c..47f45db692e5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_internet_gateways_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtInternetGatewaysOperationsAsync(AzureMgmtRecor def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_internet_gateways_get(self, resource_group): + response = await self.client.internet_gateways.get( + resource_group_name=resource_group.name, + internet_gateway_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateways_begin_create(self, resource_group): @@ -28,14 +39,19 @@ async def test_internet_gateways_begin_create(self, resource_group): internet_gateway_name="str", body={ "location": "str", - "networkFabricControllerId": "str", - "annotation": "str", + "properties": { + "networkFabricControllerId": "str", + "annotation": "str", + "internetGatewayRuleId": "str", + "internetGatewayType": "str", + "ipv4Address": "str", + "lastOperation": {"details": "str"}, + "port": 0, + "provisioningState": "str", + "type": "str", + }, "id": "str", - "internetGatewayRuleId": "str", - "ipv4Address": "str", "name": "str", - "port": 0, - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -47,25 +63,12 @@ async def test_internet_gateways_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_internet_gateways_get(self, resource_group): - response = await self.client.internet_gateways.get( - resource_group_name=resource_group.name, - internet_gateway_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateways_begin_update(self, resource_group): @@ -73,8 +76,7 @@ async def test_internet_gateways_begin_update(self, resource_group): await self.client.internet_gateways.begin_update( resource_group_name=resource_group.name, internet_gateway_name="str", - body={"internetGatewayRuleId": "str", "tags": {"str": "str"}}, - api_version="2023-06-15", + body={"properties": {"internetGatewayRuleId": "str"}, "tags": {"str": "str"}}, ) ).result() # call '.result()' to poll until service return final result @@ -88,7 +90,6 @@ async def test_internet_gateways_begin_delete(self, resource_group): await self.client.internet_gateways.begin_delete( resource_group_name=resource_group.name, internet_gateway_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -100,7 +101,6 @@ async def test_internet_gateways_begin_delete(self, resource_group): async def test_internet_gateways_list_by_resource_group(self, resource_group): response = self.client.internet_gateways.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -109,9 +109,7 @@ async def test_internet_gateways_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_internet_gateways_list_by_subscription(self, resource_group): - response = self.client.internet_gateways.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.internet_gateways.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py index 3de2d43d79d3..27b98c36e28b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtIpCommunitiesOperations(AzureMgmtRecordedTestC def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_communities_get(self, resource_group): + response = self.client.ip_communities.get( + resource_group_name=resource_group.name, + ip_community_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_communities_begin_create(self, resource_group): @@ -26,15 +37,24 @@ def test_ip_communities_begin_create(self, resource_group): ip_community_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", - "ipCommunityRules": [ - {"action": "str", "communityMembers": ["str"], "sequenceNumber": 0, "wellKnownCommunities": ["str"]} - ], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,24 +66,11 @@ def test_ip_communities_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_ip_communities_get(self, resource_group): - response = self.client.ip_communities.get( - resource_group_name=resource_group.name, - ip_community_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_communities_begin_update(self, resource_group): @@ -71,12 +78,18 @@ def test_ip_communities_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_community_name="str", body={ - "ipCommunityRules": [ - {"action": "str", "communityMembers": ["str"], "sequenceNumber": 0, "wellKnownCommunities": ["str"]} - ], + "properties": { + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ] + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -88,7 +101,6 @@ def test_ip_communities_begin_delete(self, resource_group): response = self.client.ip_communities.begin_delete( resource_group_name=resource_group.name, ip_community_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -99,7 +111,6 @@ def test_ip_communities_begin_delete(self, resource_group): def test_ip_communities_list_by_resource_group(self, resource_group): response = self.client.ip_communities.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -108,9 +119,7 @@ def test_ip_communities_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_communities_list_by_subscription(self, resource_group): - response = self.client.ip_communities.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_communities.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py index ad577d6362ea..b3a48068c52c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_communities_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtIpCommunitiesOperationsAsync(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_communities_get(self, resource_group): + response = await self.client.ip_communities.get( + resource_group_name=resource_group.name, + ip_community_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_communities_begin_create(self, resource_group): @@ -28,20 +39,24 @@ async def test_ip_communities_begin_create(self, resource_group): ip_community_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", - "ipCommunityRules": [ - { - "action": "str", - "communityMembers": ["str"], - "sequenceNumber": 0, - "wellKnownCommunities": ["str"], - } - ], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -53,25 +68,12 @@ async def test_ip_communities_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_ip_communities_get(self, resource_group): - response = await self.client.ip_communities.get( - resource_group_name=resource_group.name, - ip_community_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_communities_begin_update(self, resource_group): @@ -80,17 +82,18 @@ async def test_ip_communities_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_community_name="str", body={ - "ipCommunityRules": [ - { - "action": "str", - "communityMembers": ["str"], - "sequenceNumber": 0, - "wellKnownCommunities": ["str"], - } - ], + "properties": { + "ipCommunityRules": [ + { + "action": "str", + "communityMembers": ["str"], + "sequenceNumber": 0, + "wellKnownCommunities": ["str"], + } + ] + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -104,7 +107,6 @@ async def test_ip_communities_begin_delete(self, resource_group): await self.client.ip_communities.begin_delete( resource_group_name=resource_group.name, ip_community_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -116,7 +118,6 @@ async def test_ip_communities_begin_delete(self, resource_group): async def test_ip_communities_list_by_resource_group(self, resource_group): response = self.client.ip_communities.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -125,9 +126,7 @@ async def test_ip_communities_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_communities_list_by_subscription(self, resource_group): - response = self.client.ip_communities.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_communities.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py index 27a989b31aaf..2931a1971331 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtIpExtendedCommunitiesOperations(AzureMgmtRecor def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_extended_communities_get(self, resource_group): + response = self.client.ip_extended_communities.get( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_extended_communities_begin_create(self, resource_group): @@ -25,14 +36,18 @@ def test_ip_extended_communities_begin_create(self, resource_group): resource_group_name=resource_group.name, ip_extended_community_name="str", body={ - "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -44,24 +59,11 @@ def test_ip_extended_communities_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_ip_extended_communities_get(self, resource_group): - response = self.client.ip_extended_communities.get( - resource_group_name=resource_group.name, - ip_extended_community_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_extended_communities_begin_update(self, resource_group): @@ -69,11 +71,12 @@ def test_ip_extended_communities_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_extended_community_name="str", body={ - "annotation": "str", - "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "properties": { + "annotation": "str", + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -85,7 +88,6 @@ def test_ip_extended_communities_begin_delete(self, resource_group): response = self.client.ip_extended_communities.begin_delete( resource_group_name=resource_group.name, ip_extended_community_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,7 +98,6 @@ def test_ip_extended_communities_begin_delete(self, resource_group): def test_ip_extended_communities_list_by_resource_group(self, resource_group): response = self.client.ip_extended_communities.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -105,9 +106,7 @@ def test_ip_extended_communities_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_extended_communities_list_by_subscription(self, resource_group): - response = self.client.ip_extended_communities.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_extended_communities.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py index 93255b6f7c4e..431dbe588446 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_extended_communities_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtIpExtendedCommunitiesOperationsAsync(AzureMgmt def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_extended_communities_get(self, resource_group): + response = await self.client.ip_extended_communities.get( + resource_group_name=resource_group.name, + ip_extended_community_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_extended_communities_begin_create(self, resource_group): @@ -27,14 +38,18 @@ async def test_ip_extended_communities_begin_create(self, resource_group): resource_group_name=resource_group.name, ip_extended_community_name="str", body={ - "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,25 +61,12 @@ async def test_ip_extended_communities_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_ip_extended_communities_get(self, resource_group): - response = await self.client.ip_extended_communities.get( - resource_group_name=resource_group.name, - ip_extended_community_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_extended_communities_begin_update(self, resource_group): @@ -73,11 +75,12 @@ async def test_ip_extended_communities_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_extended_community_name="str", body={ - "annotation": "str", - "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + "properties": { + "annotation": "str", + "ipExtendedCommunityRules": [{"action": "str", "routeTargets": ["str"], "sequenceNumber": 0}], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -91,7 +94,6 @@ async def test_ip_extended_communities_begin_delete(self, resource_group): await self.client.ip_extended_communities.begin_delete( resource_group_name=resource_group.name, ip_extended_community_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -103,7 +105,6 @@ async def test_ip_extended_communities_begin_delete(self, resource_group): async def test_ip_extended_communities_list_by_resource_group(self, resource_group): response = self.client.ip_extended_communities.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -112,9 +113,7 @@ async def test_ip_extended_communities_list_by_resource_group(self, resource_gro @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_extended_communities_list_by_subscription(self, resource_group): - response = self.client.ip_extended_communities.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_extended_communities.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py index 1b58da0bb454..3676682003e7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtIpPrefixesOperations(AzureMgmtRecordedTestCase def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_ip_prefixes_get(self, resource_group): + response = self.client.ip_prefixes.get( + resource_group_name=resource_group.name, + ip_prefix_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_prefixes_begin_create(self, resource_group): @@ -26,21 +37,25 @@ def test_ip_prefixes_begin_create(self, resource_group): ip_prefix_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", - "ipPrefixRules": [ - { - "action": "str", - "networkPrefix": "str", - "sequenceNumber": 0, - "condition": "str", - "subnetMaskLength": "str", - } - ], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -52,24 +67,11 @@ def test_ip_prefixes_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_ip_prefixes_get(self, resource_group): - response = self.client.ip_prefixes.get( - resource_group_name=resource_group.name, - ip_prefix_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_prefixes_begin_update(self, resource_group): @@ -77,19 +79,20 @@ def test_ip_prefixes_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_prefix_name="str", body={ - "annotation": "str", - "ipPrefixRules": [ - { - "action": "str", - "networkPrefix": "str", - "sequenceNumber": 0, - "condition": "str", - "subnetMaskLength": "str", - } - ], + "properties": { + "annotation": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -101,7 +104,6 @@ def test_ip_prefixes_begin_delete(self, resource_group): response = self.client.ip_prefixes.begin_delete( resource_group_name=resource_group.name, ip_prefix_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -112,7 +114,6 @@ def test_ip_prefixes_begin_delete(self, resource_group): def test_ip_prefixes_list_by_resource_group(self, resource_group): response = self.client.ip_prefixes.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -121,9 +122,7 @@ def test_ip_prefixes_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_ip_prefixes_list_by_subscription(self, resource_group): - response = self.client.ip_prefixes.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_prefixes.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py index 1483067ffdd0..46f4c48d5da1 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_ip_prefixes_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtIpPrefixesOperationsAsync(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_ip_prefixes_get(self, resource_group): + response = await self.client.ip_prefixes.get( + resource_group_name=resource_group.name, + ip_prefix_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_prefixes_begin_create(self, resource_group): @@ -28,21 +39,25 @@ async def test_ip_prefixes_begin_create(self, resource_group): ip_prefix_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "provisioningState": "str", + }, "id": "str", - "ipPrefixRules": [ - { - "action": "str", - "networkPrefix": "str", - "sequenceNumber": 0, - "condition": "str", - "subnetMaskLength": "str", - } - ], "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -54,25 +69,12 @@ async def test_ip_prefixes_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_ip_prefixes_get(self, resource_group): - response = await self.client.ip_prefixes.get( - resource_group_name=resource_group.name, - ip_prefix_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_prefixes_begin_update(self, resource_group): @@ -81,19 +83,20 @@ async def test_ip_prefixes_begin_update(self, resource_group): resource_group_name=resource_group.name, ip_prefix_name="str", body={ - "annotation": "str", - "ipPrefixRules": [ - { - "action": "str", - "networkPrefix": "str", - "sequenceNumber": 0, - "condition": "str", - "subnetMaskLength": "str", - } - ], + "properties": { + "annotation": "str", + "ipPrefixRules": [ + { + "action": "str", + "networkPrefix": "str", + "sequenceNumber": 0, + "condition": "str", + "subnetMaskLength": "str", + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -107,7 +110,6 @@ async def test_ip_prefixes_begin_delete(self, resource_group): await self.client.ip_prefixes.begin_delete( resource_group_name=resource_group.name, ip_prefix_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -119,7 +121,6 @@ async def test_ip_prefixes_begin_delete(self, resource_group): async def test_ip_prefixes_list_by_resource_group(self, resource_group): response = self.client.ip_prefixes.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -128,9 +129,7 @@ async def test_ip_prefixes_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_ip_prefixes_list_by_subscription(self, resource_group): - response = self.client.ip_prefixes.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.ip_prefixes.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py index 7b3c7f3bf81c..90e8d1a01d00 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtL2IsolationDomainsOperations(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_get(self, resource_group): + response = self.client.l2_isolation_domains.get( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_l2_isolation_domains_begin_create(self, resource_group): @@ -26,15 +37,26 @@ def test_l2_isolation_domains_begin_create(self, resource_group): l2_isolation_domain_name="str", body={ "location": "str", - "networkFabricId": "str", - "vlanId": 0, - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "networkFabricId": "str", + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "extendedVlan": "str", + "lastOperation": {"details": "str"}, + "mtu": 0, + "networkToNetworkInterconnectId": "str", + "provisioningState": "str", + }, "id": "str", - "mtu": 1500, + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,7 +68,6 @@ def test_l2_isolation_domains_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -54,24 +75,34 @@ def test_l2_isolation_domains_begin_create(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_l2_isolation_domains_get(self, resource_group): - response = self.client.l2_isolation_domains.get( + def test_l2_isolation_domains_begin_update(self, resource_group): + response = self.client.l2_isolation_domains.begin_update( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", - ) + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "extendedVlan": "str", + "mtu": 0, + "networkToNetworkInterconnectId": "str", + }, + "tags": {"str": "str"}, + }, + ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_l2_isolation_domains_begin_update(self, resource_group): - response = self.client.l2_isolation_domains.begin_update( + def test_l2_isolation_domains_begin_delete(self, resource_group): + response = self.client.l2_isolation_domains.begin_delete( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - body={"annotation": "str", "mtu": 1500, "tags": {"str": "str"}}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -79,13 +110,19 @@ def test_l2_isolation_domains_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_l2_isolation_domains_begin_delete(self, resource_group): - response = self.client.l2_isolation_domains.begin_delete( + def test_l2_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l2_isolation_domains.list_by_resource_group( resource_group_name=resource_group.name, - l2_isolation_domain_name="str", - api_version="2023-06-15", - ).result() # call '.result()' to poll until service return final result + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l2_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l2_isolation_domains.list_by_subscription() + result = [r for r in response] # please add some check logic here by yourself # ... @@ -96,7 +133,6 @@ def test_l2_isolation_domains_begin_update_administrative_state(self, resource_g resource_group_name=resource_group.name, l2_isolation_domain_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -108,7 +144,6 @@ def test_l2_isolation_domains_begin_validate_configuration(self, resource_group) response = self.client.l2_isolation_domains.begin_validate_configuration( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -120,29 +155,7 @@ def test_l2_isolation_domains_begin_commit_configuration(self, resource_group): response = self.client.l2_isolation_domains.begin_commit_configuration( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_l2_isolation_domains_list_by_resource_group(self, resource_group): - response = self.client.l2_isolation_domains.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2023-06-15", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_l2_isolation_domains_list_by_subscription(self, resource_group): - response = self.client.l2_isolation_domains.list_by_subscription( - api_version="2023-06-15", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py index 60021d1076e9..4e59004e0e86 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l2_isolation_domains_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtL2IsolationDomainsOperationsAsync(AzureMgmtRec def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_get(self, resource_group): + response = await self.client.l2_isolation_domains.get( + resource_group_name=resource_group.name, + l2_isolation_domain_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l2_isolation_domains_begin_create(self, resource_group): @@ -28,15 +39,26 @@ async def test_l2_isolation_domains_begin_create(self, resource_group): l2_isolation_domain_name="str", body={ "location": "str", - "networkFabricId": "str", - "vlanId": 0, - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "networkFabricId": "str", + "vlanId": 0, + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "extendedVlan": "str", + "lastOperation": {"details": "str"}, + "mtu": 0, + "networkToNetworkInterconnectId": "str", + "provisioningState": "str", + }, "id": "str", - "mtu": 1500, + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -48,25 +70,12 @@ async def test_l2_isolation_domains_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_l2_isolation_domains_get(self, resource_group): - response = await self.client.l2_isolation_domains.get( - resource_group_name=resource_group.name, - l2_isolation_domain_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l2_isolation_domains_begin_update(self, resource_group): @@ -74,8 +83,19 @@ async def test_l2_isolation_domains_begin_update(self, resource_group): await self.client.l2_isolation_domains.begin_update( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - body={"annotation": "str", "mtu": 1500, "tags": {"str": "str"}}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "extendedVlan": "str", + "mtu": 0, + "networkToNetworkInterconnectId": "str", + }, + "tags": {"str": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result @@ -89,13 +109,30 @@ async def test_l2_isolation_domains_begin_delete(self, resource_group): await self.client.l2_isolation_domains.begin_delete( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_list_by_resource_group(self, resource_group): + response = self.client.l2_isolation_domains.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l2_isolation_domains_list_by_subscription(self, resource_group): + response = self.client.l2_isolation_domains.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l2_isolation_domains_begin_update_administrative_state(self, resource_group): @@ -104,7 +141,6 @@ async def test_l2_isolation_domains_begin_update_administrative_state(self, reso resource_group_name=resource_group.name, l2_isolation_domain_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -118,7 +154,6 @@ async def test_l2_isolation_domains_begin_validate_configuration(self, resource_ await self.client.l2_isolation_domains.begin_validate_configuration( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -132,30 +167,8 @@ async def test_l2_isolation_domains_begin_commit_configuration(self, resource_gr await self.client.l2_isolation_domains.begin_commit_configuration( resource_group_name=resource_group.name, l2_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_l2_isolation_domains_list_by_resource_group(self, resource_group): - response = self.client.l2_isolation_domains.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2023-06-15", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_l2_isolation_domains_list_by_subscription(self, resource_group): - response = self.client.l2_isolation_domains.list_by_subscription( - api_version="2023-06-15", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py index 7c7f090f2353..0b06ab98341c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtL3IsolationDomainsOperations(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_l3_isolation_domains_get(self, resource_group): + response = self.client.l3_isolation_domains.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_l3_isolation_domains_begin_create(self, resource_group): @@ -26,20 +37,38 @@ def test_l3_isolation_domains_begin_create(self, resource_group): l3_isolation_domain_name="str", body={ "location": "str", - "networkFabricId": "str", - "administrativeState": "str", - "aggregateRouteConfiguration": {"ipv4Routes": [{"prefix": "str"}], "ipv6Routes": [{"prefix": "str"}]}, - "annotation": "str", - "configurationState": "str", - "connectedSubnetRoutePolicy": { - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", + "properties": { + "networkFabricId": "str", + "administrativeState": "str", + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "configurationState": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "lastOperation": {"details": "str"}, + "provisioningState": "str", + "redistributeConnectedSubnets": "str", + "redistributeStaticRoutes": "str", + "staticRouteRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "uniqueRdConfiguration": {"uniqueRds": ["str"]}, + "v4routePrefixLimit": {"hardLimit": 0, "threshold": 0}, + "v6routePrefixLimit": {"hardLimit": 0, "threshold": 0}, }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", - "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -51,24 +80,11 @@ def test_l3_isolation_domains_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_l3_isolation_domains_get(self, resource_group): - response = self.client.l3_isolation_domains.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_l3_isolation_domains_begin_update(self, resource_group): @@ -76,17 +92,30 @@ def test_l3_isolation_domains_begin_update(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", body={ - "aggregateRouteConfiguration": {"ipv4Routes": [{"prefix": "str"}], "ipv6Routes": [{"prefix": "str"}]}, - "annotation": "str", - "connectedSubnetRoutePolicy": { - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "redistributeConnectedSubnets": "str", + "redistributeStaticRoutes": "str", + "staticRouteRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "v4routePrefixLimit": {"hardLimit": 0, "threshold": 0}, + "v6routePrefixLimit": {"hardLimit": 0, "threshold": 0}, }, - "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -98,7 +127,6 @@ def test_l3_isolation_domains_begin_delete(self, resource_group): response = self.client.l3_isolation_domains.begin_delete( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -109,7 +137,6 @@ def test_l3_isolation_domains_begin_delete(self, resource_group): def test_l3_isolation_domains_list_by_resource_group(self, resource_group): response = self.client.l3_isolation_domains.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -118,9 +145,7 @@ def test_l3_isolation_domains_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_l3_isolation_domains_list_by_subscription(self, resource_group): - response = self.client.l3_isolation_domains.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.l3_isolation_domains.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -132,7 +157,6 @@ def test_l3_isolation_domains_begin_update_administrative_state(self, resource_g resource_group_name=resource_group.name, l3_isolation_domain_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -144,7 +168,6 @@ def test_l3_isolation_domains_begin_validate_configuration(self, resource_group) response = self.client.l3_isolation_domains.begin_validate_configuration( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -156,7 +179,6 @@ def test_l3_isolation_domains_begin_commit_configuration(self, resource_group): response = self.client.l3_isolation_domains.begin_commit_configuration( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py index 885757d8634f..3bd17df8f06e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_l3_isolation_domains_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtL3IsolationDomainsOperationsAsync(AzureMgmtRec def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_l3_isolation_domains_get(self, resource_group): + response = await self.client.l3_isolation_domains.get( + resource_group_name=resource_group.name, + l3_isolation_domain_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l3_isolation_domains_begin_create(self, resource_group): @@ -28,23 +39,38 @@ async def test_l3_isolation_domains_begin_create(self, resource_group): l3_isolation_domain_name="str", body={ "location": "str", - "networkFabricId": "str", - "administrativeState": "str", - "aggregateRouteConfiguration": { - "ipv4Routes": [{"prefix": "str"}], - "ipv6Routes": [{"prefix": "str"}], - }, - "annotation": "str", - "configurationState": "str", - "connectedSubnetRoutePolicy": { - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", + "properties": { + "networkFabricId": "str", + "administrativeState": "str", + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "configurationState": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "lastOperation": {"details": "str"}, + "provisioningState": "str", + "redistributeConnectedSubnets": "str", + "redistributeStaticRoutes": "str", + "staticRouteRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "uniqueRdConfiguration": {"uniqueRds": ["str"]}, + "v4routePrefixLimit": {"hardLimit": 0, "threshold": 0}, + "v6routePrefixLimit": {"hardLimit": 0, "threshold": 0}, }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", - "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -56,25 +82,12 @@ async def test_l3_isolation_domains_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_l3_isolation_domains_get(self, resource_group): - response = await self.client.l3_isolation_domains.get( - resource_group_name=resource_group.name, - l3_isolation_domain_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l3_isolation_domains_begin_update(self, resource_group): @@ -83,20 +96,30 @@ async def test_l3_isolation_domains_begin_update(self, resource_group): resource_group_name=resource_group.name, l3_isolation_domain_name="str", body={ - "aggregateRouteConfiguration": { - "ipv4Routes": [{"prefix": "str"}], - "ipv6Routes": [{"prefix": "str"}], + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "annotation": "str", - "connectedSubnetRoutePolicy": { - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "exportRoutePolicyId": "str", + "properties": { + "aggregateRouteConfiguration": { + "ipv4Routes": [{"prefix": "str"}], + "ipv6Routes": [{"prefix": "str"}], + }, + "annotation": "str", + "connectedSubnetRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "redistributeConnectedSubnets": "str", + "redistributeStaticRoutes": "str", + "staticRouteRoutePolicy": { + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"} + }, + "v4routePrefixLimit": {"hardLimit": 0, "threshold": 0}, + "v6routePrefixLimit": {"hardLimit": 0, "threshold": 0}, }, - "redistributeConnectedSubnets": "True", - "redistributeStaticRoutes": "False", "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +133,6 @@ async def test_l3_isolation_domains_begin_delete(self, resource_group): await self.client.l3_isolation_domains.begin_delete( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -122,7 +144,6 @@ async def test_l3_isolation_domains_begin_delete(self, resource_group): async def test_l3_isolation_domains_list_by_resource_group(self, resource_group): response = self.client.l3_isolation_domains.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -131,9 +152,7 @@ async def test_l3_isolation_domains_list_by_resource_group(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_l3_isolation_domains_list_by_subscription(self, resource_group): - response = self.client.l3_isolation_domains.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.l3_isolation_domains.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -146,7 +165,6 @@ async def test_l3_isolation_domains_begin_update_administrative_state(self, reso resource_group_name=resource_group.name, l3_isolation_domain_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -160,7 +178,6 @@ async def test_l3_isolation_domains_begin_validate_configuration(self, resource_ await self.client.l3_isolation_domains.begin_validate_configuration( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -174,7 +191,6 @@ async def test_l3_isolation_domains_begin_commit_configuration(self, resource_gr await self.client.l3_isolation_domains.begin_commit_configuration( resource_group_name=resource_group.name, l3_isolation_domain_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py index 5540915b30d0..3f9e29925670 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNeighborGroupsOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_get(self, resource_group): + response = self.client.neighbor_groups.get( + resource_group_name=resource_group.name, + neighbor_group_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_neighbor_groups_begin_create(self, resource_group): @@ -26,13 +37,24 @@ def test_neighbor_groups_begin_create(self, resource_group): neighbor_group_name="str", body={ "location": "str", - "annotation": "str", - "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "properties": { + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricIds": ["str"], + "networkTapIds": ["str"], + "networkTapRuleIds": ["str"], + "provisioningState": "str", + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkTapIds": ["str"], - "networkTapRuleIds": ["str"], - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -44,24 +66,11 @@ def test_neighbor_groups_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_neighbor_groups_get(self, resource_group): - response = self.client.neighbor_groups.get( - resource_group_name=resource_group.name, - neighbor_group_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_neighbor_groups_begin_update(self, resource_group): @@ -69,11 +78,16 @@ def test_neighbor_groups_begin_update(self, resource_group): resource_group_name=resource_group.name, neighbor_group_name="str", body={ - "annotation": "str", - "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -85,7 +99,6 @@ def test_neighbor_groups_begin_delete(self, resource_group): response = self.client.neighbor_groups.begin_delete( resource_group_name=resource_group.name, neighbor_group_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,7 +109,6 @@ def test_neighbor_groups_begin_delete(self, resource_group): def test_neighbor_groups_list_by_resource_group(self, resource_group): response = self.client.neighbor_groups.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -105,9 +117,18 @@ def test_neighbor_groups_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_neighbor_groups_list_by_subscription(self, resource_group): - response = self.client.neighbor_groups.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.neighbor_groups.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_neighbor_groups_begin_resync(self, resource_group): + response = self.client.neighbor_groups.begin_resync( + resource_group_name=resource_group.name, + neighbor_group_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py index 4c0c0e85be9d..f5bb62029b8e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_neighbor_groups_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNeighborGroupsOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_get(self, resource_group): + response = await self.client.neighbor_groups.get( + resource_group_name=resource_group.name, + neighbor_group_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_neighbor_groups_begin_create(self, resource_group): @@ -28,13 +39,24 @@ async def test_neighbor_groups_begin_create(self, resource_group): neighbor_group_name="str", body={ "location": "str", - "annotation": "str", - "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "properties": { + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricIds": ["str"], + "networkTapIds": ["str"], + "networkTapRuleIds": ["str"], + "provisioningState": "str", + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkTapIds": ["str"], - "networkTapRuleIds": ["str"], - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,25 +68,12 @@ async def test_neighbor_groups_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_neighbor_groups_get(self, resource_group): - response = await self.client.neighbor_groups.get( - resource_group_name=resource_group.name, - neighbor_group_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_neighbor_groups_begin_update(self, resource_group): @@ -73,11 +82,16 @@ async def test_neighbor_groups_begin_update(self, resource_group): resource_group_name=resource_group.name, neighbor_group_name="str", body={ - "annotation": "str", - "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "destination": {"ipv4Addresses": ["str"], "ipv6Addresses": ["str"]}, + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -91,7 +105,6 @@ async def test_neighbor_groups_begin_delete(self, resource_group): await self.client.neighbor_groups.begin_delete( resource_group_name=resource_group.name, neighbor_group_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -103,7 +116,6 @@ async def test_neighbor_groups_begin_delete(self, resource_group): async def test_neighbor_groups_list_by_resource_group(self, resource_group): response = self.client.neighbor_groups.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -112,9 +124,20 @@ async def test_neighbor_groups_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_neighbor_groups_list_by_subscription(self, resource_group): - response = self.client.neighbor_groups.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.neighbor_groups.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_neighbor_groups_begin_resync(self, resource_group): + response = await ( + await self.client.neighbor_groups.begin_resync( + resource_group_name=resource_group.name, + neighbor_group_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations.py new file mode 100644 index 000000000000..9160be4b9d36 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations.py @@ -0,0 +1,183 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkBootstrapDevicesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_get(self, resource_group): + response = self.client.network_bootstrap_devices.get( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_create(self, resource_group): + response = self.client.network_bootstrap_devices.begin_create( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={ + "location": "str", + "properties": { + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "dhcpV4ServerIpAddress": "str", + "hostName": "str", + "networkDeviceSku": "str", + "networkFabricId": "str", + "primaryManagementIpv4Address": "str", + "primaryManagementIpv6Address": "str", + "provisioningState": "str", + "secondaryManagementIpv4Address": "str", + "secondaryManagementIpv6Address": "str", + "serialNumber": "str", + "version": "str", + }, + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_update(self, resource_group): + response = self.client.network_bootstrap_devices.begin_update( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": {"annotation": "str", "hostName": "str", "serialNumber": "str"}, + "tags": {"str": "str"}, + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_delete(self, resource_group): + response = self.client.network_bootstrap_devices.begin_delete( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_list_by_resource_group(self, resource_group): + response = self.client.network_bootstrap_devices.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_list_by_subscription(self, resource_group): + response = self.client.network_bootstrap_devices.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_reboot(self, resource_group): + response = self.client.network_bootstrap_devices.begin_reboot( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_refresh_configuration(self, resource_group): + response = self.client.network_bootstrap_devices.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_upgrade(self, resource_group): + response = self.client.network_bootstrap_devices.begin_upgrade( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={"version": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_update_administrative_state(self, resource_group): + response = self.client.network_bootstrap_devices.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_devices_begin_resync_passwords(self, resource_group): + response = self.client.network_bootstrap_devices.begin_resync_passwords( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations_async.py new file mode 100644 index 000000000000..b87dfb434373 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_devices_operations_async.py @@ -0,0 +1,200 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkBootstrapDevicesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_get(self, resource_group): + response = await self.client.network_bootstrap_devices.get( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_create(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_create( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={ + "location": "str", + "properties": { + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "dhcpV4ServerIpAddress": "str", + "hostName": "str", + "networkDeviceSku": "str", + "networkFabricId": "str", + "primaryManagementIpv4Address": "str", + "primaryManagementIpv6Address": "str", + "provisioningState": "str", + "secondaryManagementIpv4Address": "str", + "secondaryManagementIpv6Address": "str", + "serialNumber": "str", + "version": "str", + }, + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_update(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_update( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": {"annotation": "str", "hostName": "str", "serialNumber": "str"}, + "tags": {"str": "str"}, + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_delete(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_delete( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_list_by_resource_group(self, resource_group): + response = self.client.network_bootstrap_devices.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_list_by_subscription(self, resource_group): + response = self.client.network_bootstrap_devices.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_reboot(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_reboot( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_refresh_configuration(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_refresh_configuration( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_upgrade(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_upgrade( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={"version": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_devices_begin_resync_passwords(self, resource_group): + response = await ( + await self.client.network_bootstrap_devices.begin_resync_passwords( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations.py new file mode 100644 index 000000000000..06fbf722f1a6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations.py @@ -0,0 +1,119 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkBootstrapInterfacesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_get(self, resource_group): + response = self.client.network_bootstrap_interfaces.get( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_begin_create(self, resource_group): + response = self.client.network_bootstrap_interfaces.begin_create( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={ + "properties": { + "additionalDescription": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "connectedTo": "str", + "description": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + "serialNumber": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_begin_update(self, resource_group): + response = self.client.network_bootstrap_interfaces.begin_update( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={"properties": {"additionalDescription": "str", "annotation": "str", "serialNumber": "str"}}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_begin_delete(self, resource_group): + response = self.client.network_bootstrap_interfaces.begin_delete( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_list_by_network_bootstrap_device(self, resource_group): + response = self.client.network_bootstrap_interfaces.list_by_network_bootstrap_device( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_bootstrap_interfaces_begin_update_administrative_state(self, resource_group): + response = self.client.network_bootstrap_interfaces.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations_async.py new file mode 100644 index 000000000000..ec594e787e8e --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_bootstrap_interfaces_operations_async.py @@ -0,0 +1,128 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkBootstrapInterfacesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_get(self, resource_group): + response = await self.client.network_bootstrap_interfaces.get( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_begin_create(self, resource_group): + response = await ( + await self.client.network_bootstrap_interfaces.begin_create( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={ + "properties": { + "additionalDescription": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "connectedTo": "str", + "description": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + "serialNumber": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_begin_update(self, resource_group): + response = await ( + await self.client.network_bootstrap_interfaces.begin_update( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={"properties": {"additionalDescription": "str", "annotation": "str", "serialNumber": "str"}}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_begin_delete(self, resource_group): + response = await ( + await self.client.network_bootstrap_interfaces.begin_delete( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_list_by_network_bootstrap_device(self, resource_group): + response = self.client.network_bootstrap_interfaces.list_by_network_bootstrap_device( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_bootstrap_interfaces_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_bootstrap_interfaces.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_bootstrap_device_name="str", + network_bootstrap_interface_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py index ffd4ef3f7753..bfe65ee9f8a8 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_network_device_skus_get(self, resource_group): response = self.client.network_device_skus.get( network_device_sku_name="str", - api_version="2023-06-15", ) # please add some check logic here by yourself @@ -32,9 +31,7 @@ def test_network_device_skus_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_device_skus_list_by_subscription(self, resource_group): - response = self.client.network_device_skus.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_device_skus.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py index 1c82dc40978d..857758b2793c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_device_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_network_device_skus_get(self, resource_group): response = await self.client.network_device_skus.get( network_device_sku_name="str", - api_version="2023-06-15", ) # please add some check logic here by yourself @@ -33,9 +32,7 @@ async def test_network_device_skus_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_device_skus_list_by_subscription(self, resource_group): - response = self.client.network_device_skus.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_device_skus.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py index cc45f2ea6aef..7235f01e1ff2 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkDevicesOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_get(self, resource_group): + response = self.client.network_devices.get( + resource_group_name=resource_group.name, + network_device_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_devices_begin_create(self, resource_group): @@ -26,19 +37,59 @@ def test_network_devices_begin_create(self, resource_group): network_device_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "hostName": "str", + "properties": { + "serialNumber": "str", + "administrativeState": "str", + "annotation": "str", + "certificateRotationStatus": [ + { + "certificateArchiveReference": { + "certificateName": "str", + "certificateVersion": "str", + "keyVaultId": "str", + "keyVaultUri": "str", + }, + "certificateType": "str", + "expireTime": "2020-02-20 00:00:00", + "lastRotationTime": "2020-02-20 00:00:00", + "synchronizationStatus": "str", + } + ], + "configurationState": "str", + "hostName": "str", + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "lastOperation": {"details": "str"}, + "managementIpv4Address": "str", + "managementIpv6Address": "str", + "networkDeviceRole": "str", + "networkDeviceSku": "str", + "networkFabricId": "str", + "networkRackId": "str", + "provisioningState": "str", + "rwDeviceConfig": "str", + "secretRotationStatus": [ + { + "lastRotationTime": "2020-02-20 00:00:00", + "secretArchiveReference": { + "keyVaultId": "str", + "keyVaultUri": "str", + "secretName": "str", + "secretVersion": "str", + }, + "secretType": "str", + "synchronizationStatus": "str", + } + ], + "version": "str", + }, "id": "str", - "managementIpv4Address": "str", - "managementIpv6Address": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkDeviceRole": "str", - "networkDeviceSku": "str", - "networkRackId": "str", - "provisioningState": "str", - "serialNumber": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -49,34 +100,31 @@ def test_network_devices_begin_create(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "version": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_devices_get(self, resource_group): - response = self.client.network_devices.get( - resource_group_name=resource_group.name, - network_device_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_devices_begin_update(self, resource_group): response = self.client.network_devices.begin_update( resource_group_name=resource_group.name, network_device_name="str", - body={"annotation": "str", "hostName": "str", "serialNumber": "str", "tags": {"str": "str"}}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "hostName": "str", + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "serialNumber": "str", + }, + "tags": {"str": "str"}, + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -88,7 +136,6 @@ def test_network_devices_begin_delete(self, resource_group): response = self.client.network_devices.begin_delete( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -99,7 +146,6 @@ def test_network_devices_begin_delete(self, resource_group): def test_network_devices_list_by_resource_group(self, resource_group): response = self.client.network_devices.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -108,9 +154,7 @@ def test_network_devices_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_devices_list_by_subscription(self, resource_group): - response = self.client.network_devices.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_devices.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -122,7 +166,6 @@ def test_network_devices_begin_reboot(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", body={"rebootType": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -134,7 +177,6 @@ def test_network_devices_begin_refresh_configuration(self, resource_group): response = self.client.network_devices.begin_refresh_configuration( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -147,7 +189,6 @@ def test_network_devices_begin_update_administrative_state(self, resource_group) resource_group_name=resource_group.name, network_device_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -159,8 +200,53 @@ def test_network_devices_begin_upgrade(self, resource_group): response = self.client.network_devices.begin_upgrade( resource_group_name=resource_group.name, network_device_name="str", - body={"version": "str"}, - api_version="2023-06-15", + body={"version": "str", "rwDeviceConfigUrl": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_run_ro_command(self, resource_group): + response = self.client.network_devices.begin_run_ro_command( + resource_group_name=resource_group.name, + network_device_name="str", + body={"command": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_run_rw_command(self, resource_group): + response = self.client.network_devices.begin_run_rw_command( + resource_group_name=resource_group.name, + network_device_name="str", + body={"command": "str", "commandUrl": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_resync_passwords(self, resource_group): + response = self.client.network_devices.begin_resync_passwords( + resource_group_name=resource_group.name, + network_device_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_devices_begin_resync_certificates(self, resource_group): + response = self.client.network_devices.begin_resync_certificates( + resource_group_name=resource_group.name, + network_device_name="str", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py index 08f7e8dd5ca5..009e50f1862c 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_devices_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkDevicesOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_get(self, resource_group): + response = await self.client.network_devices.get( + resource_group_name=resource_group.name, + network_device_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_devices_begin_create(self, resource_group): @@ -28,19 +39,59 @@ async def test_network_devices_begin_create(self, resource_group): network_device_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "hostName": "str", + "properties": { + "serialNumber": "str", + "administrativeState": "str", + "annotation": "str", + "certificateRotationStatus": [ + { + "certificateArchiveReference": { + "certificateName": "str", + "certificateVersion": "str", + "keyVaultId": "str", + "keyVaultUri": "str", + }, + "certificateType": "str", + "expireTime": "2020-02-20 00:00:00", + "lastRotationTime": "2020-02-20 00:00:00", + "synchronizationStatus": "str", + } + ], + "configurationState": "str", + "hostName": "str", + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "lastOperation": {"details": "str"}, + "managementIpv4Address": "str", + "managementIpv6Address": "str", + "networkDeviceRole": "str", + "networkDeviceSku": "str", + "networkFabricId": "str", + "networkRackId": "str", + "provisioningState": "str", + "rwDeviceConfig": "str", + "secretRotationStatus": [ + { + "lastRotationTime": "2020-02-20 00:00:00", + "secretArchiveReference": { + "keyVaultId": "str", + "keyVaultUri": "str", + "secretName": "str", + "secretVersion": "str", + }, + "secretType": "str", + "synchronizationStatus": "str", + } + ], + "version": "str", + }, "id": "str", - "managementIpv4Address": "str", - "managementIpv6Address": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkDeviceRole": "str", - "networkDeviceSku": "str", - "networkRackId": "str", - "provisioningState": "str", - "serialNumber": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -51,27 +102,13 @@ async def test_network_devices_begin_create(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "version": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_devices_get(self, resource_group): - response = await self.client.network_devices.get( - resource_group_name=resource_group.name, - network_device_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_devices_begin_update(self, resource_group): @@ -79,8 +116,19 @@ async def test_network_devices_begin_update(self, resource_group): await self.client.network_devices.begin_update( resource_group_name=resource_group.name, network_device_name="str", - body={"annotation": "str", "hostName": "str", "serialNumber": "str", "tags": {"str": "str"}}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "hostName": "str", + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "serialNumber": "str", + }, + "tags": {"str": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result @@ -94,7 +142,6 @@ async def test_network_devices_begin_delete(self, resource_group): await self.client.network_devices.begin_delete( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -106,7 +153,6 @@ async def test_network_devices_begin_delete(self, resource_group): async def test_network_devices_list_by_resource_group(self, resource_group): response = self.client.network_devices.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -115,9 +161,7 @@ async def test_network_devices_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_devices_list_by_subscription(self, resource_group): - response = self.client.network_devices.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_devices.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -130,7 +174,6 @@ async def test_network_devices_begin_reboot(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", body={"rebootType": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -144,7 +187,6 @@ async def test_network_devices_begin_refresh_configuration(self, resource_group) await self.client.network_devices.begin_refresh_configuration( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -159,7 +201,6 @@ async def test_network_devices_begin_update_administrative_state(self, resource_ resource_group_name=resource_group.name, network_device_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -173,8 +214,61 @@ async def test_network_devices_begin_upgrade(self, resource_group): await self.client.network_devices.begin_upgrade( resource_group_name=resource_group.name, network_device_name="str", - body={"version": "str"}, - api_version="2023-06-15", + body={"version": "str", "rwDeviceConfigUrl": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_run_ro_command(self, resource_group): + response = await ( + await self.client.network_devices.begin_run_ro_command( + resource_group_name=resource_group.name, + network_device_name="str", + body={"command": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_run_rw_command(self, resource_group): + response = await ( + await self.client.network_devices.begin_run_rw_command( + resource_group_name=resource_group.name, + network_device_name="str", + body={"command": "str", "commandUrl": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_resync_passwords(self, resource_group): + response = await ( + await self.client.network_devices.begin_resync_passwords( + resource_group_name=resource_group.name, + network_device_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_devices_begin_resync_certificates(self, resource_group): + response = await ( + await self.client.network_devices.begin_resync_certificates( + resource_group_name=resource_group.name, + network_device_name="str", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py index e98eff56aecf..b9155b9ff88f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkFabricControllersOperations(AzureMgmtRe def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabric_controllers_get(self, resource_group): + response = self.client.network_fabric_controllers.get( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabric_controllers_begin_create(self, resource_group): @@ -26,20 +37,34 @@ def test_network_fabric_controllers_begin_create(self, resource_group): network_fabric_controller_name="str", body={ "location": "str", - "annotation": "str", + "properties": { + "annotation": "str", + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + "ipv4AddressSpace": "str", + "ipv6AddressSpace": "str", + "isWorkloadManagementNetworkEnabled": "str", + "lastOperation": {"details": "str"}, + "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "networkFabricIds": ["str"], + "nfcSku": "str", + "provisioningState": "str", + "tenantInternetGatewayIds": ["str"], + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + }, "id": "str", - "infrastructureExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], - "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, - "ipv4AddressSpace": "10.0.0.0/19", - "ipv6AddressSpace": "FC00::/59", - "isWorkloadManagementNetworkEnabled": "True", - "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkFabricIds": ["str"], - "nfcSku": "Standard", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -49,32 +74,13 @@ def test_network_fabric_controllers_begin_create(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "tenantInternetGatewayIds": ["str"], "type": "str", - "workloadExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], - "workloadManagementNetwork": True, - "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_fabric_controllers_get(self, resource_group): - response = self.client.network_fabric_controllers.get( - resource_group_name=resource_group.name, - network_fabric_controller_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabric_controllers_begin_update(self, resource_group): @@ -82,15 +88,20 @@ def test_network_fabric_controllers_begin_update(self, resource_group): resource_group_name=resource_group.name, network_fabric_controller_name="str", body={ - "infrastructureExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + }, "tags": {"str": "str"}, - "workloadExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -102,7 +113,6 @@ def test_network_fabric_controllers_begin_delete(self, resource_group): response = self.client.network_fabric_controllers.begin_delete( resource_group_name=resource_group.name, network_fabric_controller_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -113,7 +123,6 @@ def test_network_fabric_controllers_begin_delete(self, resource_group): def test_network_fabric_controllers_list_by_resource_group(self, resource_group): response = self.client.network_fabric_controllers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -122,9 +131,7 @@ def test_network_fabric_controllers_list_by_resource_group(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabric_controllers_list_by_subscription(self, resource_group): - response = self.client.network_fabric_controllers.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabric_controllers.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py index 92df5b564d6c..3f8af3cc5d10 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_controllers_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkFabricControllersOperationsAsync(AzureM def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabric_controllers_get(self, resource_group): + response = await self.client.network_fabric_controllers.get( + resource_group_name=resource_group.name, + network_fabric_controller_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabric_controllers_begin_create(self, resource_group): @@ -28,20 +39,34 @@ async def test_network_fabric_controllers_begin_create(self, resource_group): network_fabric_controller_name="str", body={ "location": "str", - "annotation": "str", + "properties": { + "annotation": "str", + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + "ipv4AddressSpace": "str", + "ipv6AddressSpace": "str", + "isWorkloadManagementNetworkEnabled": "str", + "lastOperation": {"details": "str"}, + "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "networkFabricIds": ["str"], + "nfcSku": "str", + "provisioningState": "str", + "tenantInternetGatewayIds": ["str"], + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, + }, "id": "str", - "infrastructureExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], - "infrastructureServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, - "ipv4AddressSpace": "10.0.0.0/19", - "ipv6AddressSpace": "FC00::/59", - "isWorkloadManagementNetworkEnabled": "True", - "managedResourceGroupConfiguration": {"location": "str", "name": "str"}, + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkFabricIds": ["str"], - "nfcSku": "Standard", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -51,33 +76,14 @@ async def test_network_fabric_controllers_begin_create(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "tenantInternetGatewayIds": ["str"], "type": "str", - "workloadExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], - "workloadManagementNetwork": True, - "workloadServices": {"ipv4AddressSpaces": ["str"], "ipv6AddressSpaces": ["str"]}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_fabric_controllers_get(self, resource_group): - response = await self.client.network_fabric_controllers.get( - resource_group_name=resource_group.name, - network_fabric_controller_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabric_controllers_begin_update(self, resource_group): @@ -86,15 +92,20 @@ async def test_network_fabric_controllers_begin_update(self, resource_group): resource_group_name=resource_group.name, network_fabric_controller_name="str", body={ - "infrastructureExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "infrastructureExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + "workloadExpressRouteConnections": [ + {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} + ], + }, "tags": {"str": "str"}, - "workloadExpressRouteConnections": [ - {"expressRouteAuthorizationKey": "str", "expressRouteCircuitId": "str"} - ], }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -108,7 +119,6 @@ async def test_network_fabric_controllers_begin_delete(self, resource_group): await self.client.network_fabric_controllers.begin_delete( resource_group_name=resource_group.name, network_fabric_controller_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -120,7 +130,6 @@ async def test_network_fabric_controllers_begin_delete(self, resource_group): async def test_network_fabric_controllers_list_by_resource_group(self, resource_group): response = self.client.network_fabric_controllers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -129,9 +138,7 @@ async def test_network_fabric_controllers_list_by_resource_group(self, resource_ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabric_controllers_list_by_subscription(self, resource_group): - response = self.client.network_fabric_controllers.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabric_controllers.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py index 5f2485c1533f..020d3fd8a936 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_network_fabric_skus_get(self, resource_group): response = self.client.network_fabric_skus.get( network_fabric_sku_name="str", - api_version="2023-06-15", ) # please add some check logic here by yourself @@ -32,9 +31,7 @@ def test_network_fabric_skus_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabric_skus_list_by_subscription(self, resource_group): - response = self.client.network_fabric_skus.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabric_skus.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py index 081baab6e729..50857255a77e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabric_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_network_fabric_skus_get(self, resource_group): response = await self.client.network_fabric_skus.get( network_fabric_sku_name="str", - api_version="2023-06-15", ) # please add some check logic here by yourself @@ -33,9 +32,7 @@ async def test_network_fabric_skus_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabric_skus_list_by_subscription(self, resource_group): - response = self.client.network_fabric_skus.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabric_skus.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py index a3701c0e0216..c28fb019123e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkFabricsOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_get(self, resource_group): + response = self.client.network_fabrics.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabrics_begin_create(self, resource_group): @@ -25,95 +36,136 @@ def test_network_fabrics_begin_create(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={ - "fabricASN": 0, - "ipv4Prefix": "str", "location": "str", - "managementNetworkConfiguration": { - "infrastructureVpnConfiguration": { - "peeringOption": "str", - "administrativeState": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "fabricASN": 0, + "ipv4Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, }, - }, - "workloadVpnConfiguration": { - "peeringOption": "str", - "administrativeState": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "workloadVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, }, }, + "networkFabricControllerId": "str", + "networkFabricSku": "str", + "serverCountPerRack": 0, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "secondaryIpv4Prefix": "str", + "username": "str", + "networkDeviceId": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv6Prefix": "str", + "secretRotationStatus": [ + { + "lastRotationTime": "2020-02-20 00:00:00", + "secretArchiveReference": { + "keyVaultId": "str", + "keyVaultUri": "str", + "secretName": "str", + "secretVersion": "str", + }, + "secretType": "str", + "synchronizationStatus": "str", + } + ], + "serialNumber": "str", + }, + "activeCommitBatches": ["str"], + "administrativeState": "str", + "annotation": "str", + "authorizedTransceiver": {"key": "str", "vendor": "str"}, + "configurationState": "str", + "controlPlaneAcls": ["str"], + "fabricLocks": [{"lockState": "str", "lockType": "str"}], + "fabricVersion": "str", + "featureFlags": [{"featureFlagName": "str", "featureFlagValue": "str"}], + "hardwareAlertThreshold": 0, + "ipv6Prefix": "str", + "l2IsolationDomains": ["str"], + "l3IsolationDomains": ["str"], + "lastOperation": {"details": "str"}, + "provisioningState": "str", + "qosConfiguration": {"qosConfigurationState": "str"}, + "rackCount": 0, + "racks": ["str"], + "routerIds": ["str"], + "secretRotationSummary": {"activePasswordSetCount": 0}, + "storageAccountConfiguration": { + "storageAccountId": "str", + "storageAccountIdentity": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + }, + "storageArrayCount": 0, + "trustedIpPrefixes": ["str"], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "str", + "uniqueRdConfigurationState": "str", + "uniqueRds": ["str"], + }, }, - "networkFabricControllerId": "str", - "networkFabricSku": "str", - "serverCountPerRack": 0, - "terminalServerConfiguration": { - "networkDeviceId": "str", - "password": "str", - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "serialNumber": "str", - "username": "str", - }, - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "fabricVersion": "str", "id": "str", - "ipv6Prefix": "str", - "l2IsolationDomains": ["str"], - "l3IsolationDomains": ["str"], + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", - "rackCount": 0, - "racks": ["str"], - "routerIds": ["str"], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -125,24 +177,11 @@ def test_network_fabrics_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_fabrics_get(self, resource_group): - response = self.client.network_fabrics.get( - resource_group_name=resource_group.name, - network_fabric_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabrics_begin_update(self, resource_group): @@ -150,82 +189,101 @@ def test_network_fabrics_begin_update(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={ - "annotation": "str", - "fabricASN": 0, - "ipv4Prefix": "str", - "ipv6Prefix": "str", - "managementNetworkConfiguration": { - "infrastructureVpnConfiguration": { - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "authorizedTransceiver": {"key": "str", "vendor": "str"}, + "controlPlaneAcls": ["str"], + "fabricASN": 0, + "featureFlags": [{"featureFlagName": "str", "featureFlagValue": "str"}], + "hardwareAlertThreshold": 0, + "ipv4Prefix": "str", + "ipv6Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, + "peeringOption": "str", }, - "peeringOption": "str", - }, - "workloadVpnConfiguration": { - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "workloadVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, + "peeringOption": "str", }, - "peeringOption": "str", + }, + "qosConfiguration": {"qosConfigurationState": "str"}, + "rackCount": 0, + "serverCountPerRack": 0, + "storageAccountConfiguration": { + "storageAccountId": "str", + "storageAccountIdentity": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + }, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + "trustedIpPrefixes": ["str"], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "str", + "uniqueRdConfigurationState": "str", }, }, - "rackCount": 0, - "serverCountPerRack": 0, "tags": {"str": "str"}, - "terminalServerConfiguration": { - "password": "str", - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "serialNumber": "str", - "username": "str", - }, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -237,7 +295,6 @@ def test_network_fabrics_begin_delete(self, resource_group): response = self.client.network_fabrics.begin_delete( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -248,7 +305,6 @@ def test_network_fabrics_begin_delete(self, resource_group): def test_network_fabrics_list_by_resource_group(self, resource_group): response = self.client.network_fabrics.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -257,9 +313,7 @@ def test_network_fabrics_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_fabrics_list_by_subscription(self, resource_group): - response = self.client.network_fabrics.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabrics.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -270,7 +324,6 @@ def test_network_fabrics_begin_provision(self, resource_group): response = self.client.network_fabrics.begin_provision( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -282,7 +335,6 @@ def test_network_fabrics_begin_deprovision(self, resource_group): response = self.client.network_fabrics.begin_deprovision( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -295,7 +347,6 @@ def test_network_fabrics_begin_upgrade(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={"action": "str", "version": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -307,7 +358,6 @@ def test_network_fabrics_begin_refresh_configuration(self, resource_group): response = self.client.network_fabrics.begin_refresh_configuration( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -320,7 +370,6 @@ def test_network_fabrics_begin_update_workload_management_bfd_configuration(self resource_group_name=resource_group.name, network_fabric_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -333,7 +382,6 @@ def test_network_fabrics_begin_update_infra_management_bfd_configuration(self, r resource_group_name=resource_group.name, network_fabric_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -346,7 +394,6 @@ def test_network_fabrics_begin_validate_configuration(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={"validateAction": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -358,7 +405,6 @@ def test_network_fabrics_begin_get_topology(self, resource_group): response = self.client.network_fabrics.begin_get_topology( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -370,7 +416,108 @@ def test_network_fabrics_begin_commit_configuration(self, resource_group): response = self.client.network_fabrics.begin_commit_configuration( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_commit_batch_status(self, resource_group): + response = self.client.network_fabrics.begin_commit_batch_status( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"commitBatchId": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_discard_commit_batch(self, resource_group): + response = self.client.network_fabrics.begin_discard_commit_batch( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"commitBatchId": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_lock_fabric(self, resource_group): + response = self.client.network_fabrics.begin_lock_fabric( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"action": "str", "lockType": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_view_device_configuration(self, resource_group): + response = self.client.network_fabrics.begin_view_device_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_arm_configuration_diff(self, resource_group): + response = self.client.network_fabrics.begin_arm_configuration_diff( + resource_group_name=resource_group.name, + network_fabric_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_rotate_passwords(self, resource_group): + response = self.client.network_fabrics.begin_rotate_passwords( + resource_group_name=resource_group.name, + network_fabric_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_resync_passwords(self, resource_group): + response = self.client.network_fabrics.begin_resync_passwords( + resource_group_name=resource_group.name, + network_fabric_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_rotate_certificates(self, resource_group): + response = self.client.network_fabrics.begin_rotate_certificates( + resource_group_name=resource_group.name, + network_fabric_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_fabrics_begin_resync_certificates(self, resource_group): + response = self.client.network_fabrics.begin_resync_certificates( + resource_group_name=resource_group.name, + network_fabric_name="str", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py index 44d47e840ad7..ae3594926f94 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_fabrics_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkFabricsOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_get(self, resource_group): + response = await self.client.network_fabrics.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabrics_begin_create(self, resource_group): @@ -27,95 +38,136 @@ async def test_network_fabrics_begin_create(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={ - "fabricASN": 0, - "ipv4Prefix": "str", "location": "str", - "managementNetworkConfiguration": { - "infrastructureVpnConfiguration": { - "peeringOption": "str", - "administrativeState": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "fabricASN": 0, + "ipv4Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, }, - }, - "workloadVpnConfiguration": { - "peeringOption": "str", - "administrativeState": "str", - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "workloadVpnConfiguration": { + "peeringOption": "str", + "administrativeState": "str", + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "peerASN": 0, + "vlanId": 0, + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, }, }, + "networkFabricControllerId": "str", + "networkFabricSku": "str", + "serverCountPerRack": 0, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "secondaryIpv4Prefix": "str", + "username": "str", + "networkDeviceId": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv6Prefix": "str", + "secretRotationStatus": [ + { + "lastRotationTime": "2020-02-20 00:00:00", + "secretArchiveReference": { + "keyVaultId": "str", + "keyVaultUri": "str", + "secretName": "str", + "secretVersion": "str", + }, + "secretType": "str", + "synchronizationStatus": "str", + } + ], + "serialNumber": "str", + }, + "activeCommitBatches": ["str"], + "administrativeState": "str", + "annotation": "str", + "authorizedTransceiver": {"key": "str", "vendor": "str"}, + "configurationState": "str", + "controlPlaneAcls": ["str"], + "fabricLocks": [{"lockState": "str", "lockType": "str"}], + "fabricVersion": "str", + "featureFlags": [{"featureFlagName": "str", "featureFlagValue": "str"}], + "hardwareAlertThreshold": 0, + "ipv6Prefix": "str", + "l2IsolationDomains": ["str"], + "l3IsolationDomains": ["str"], + "lastOperation": {"details": "str"}, + "provisioningState": "str", + "qosConfiguration": {"qosConfigurationState": "str"}, + "rackCount": 0, + "racks": ["str"], + "routerIds": ["str"], + "secretRotationSummary": {"activePasswordSetCount": 0}, + "storageAccountConfiguration": { + "storageAccountId": "str", + "storageAccountIdentity": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + }, + "storageArrayCount": 0, + "trustedIpPrefixes": ["str"], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "str", + "uniqueRdConfigurationState": "str", + "uniqueRds": ["str"], + }, }, - "networkFabricControllerId": "str", - "networkFabricSku": "str", - "serverCountPerRack": 0, - "terminalServerConfiguration": { - "networkDeviceId": "str", - "password": "str", - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "serialNumber": "str", - "username": "str", - }, - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "fabricVersion": "str", "id": "str", - "ipv6Prefix": "str", - "l2IsolationDomains": ["str"], - "l3IsolationDomains": ["str"], + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "provisioningState": "str", - "rackCount": 0, - "racks": ["str"], - "routerIds": ["str"], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -127,25 +179,12 @@ async def test_network_fabrics_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_fabrics_get(self, resource_group): - response = await self.client.network_fabrics.get( - resource_group_name=resource_group.name, - network_fabric_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabrics_begin_update(self, resource_group): @@ -154,82 +193,101 @@ async def test_network_fabrics_begin_update(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={ - "annotation": "str", - "fabricASN": 0, - "ipv4Prefix": "str", - "ipv6Prefix": "str", - "managementNetworkConfiguration": { - "infrastructureVpnConfiguration": { - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "authorizedTransceiver": {"key": "str", "vendor": "str"}, + "controlPlaneAcls": ["str"], + "fabricASN": 0, + "featureFlags": [{"featureFlagName": "str", "featureFlagValue": "str"}], + "hardwareAlertThreshold": 0, + "ipv4Prefix": "str", + "ipv6Prefix": "str", + "managementNetworkConfiguration": { + "infrastructureVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, + "peeringOption": "str", }, - "peeringOption": "str", - }, - "workloadVpnConfiguration": { - "networkToNetworkInterconnectId": "str", - "optionAProperties": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "workloadVpnConfiguration": { + "networkToNetworkInterconnectId": "str", + "optionAProperties": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "mtu": 0, + "peerASN": 0, + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, }, - "mtu": 1500, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, - }, - "optionBProperties": { - "exportRouteTargets": ["str"], - "importRouteTargets": ["str"], - "routeTargets": { - "exportIpv4RouteTargets": ["str"], - "exportIpv6RouteTargets": ["str"], - "importIpv4RouteTargets": ["str"], - "importIpv6RouteTargets": ["str"], + "optionBProperties": { + "exportRouteTargets": ["str"], + "importRouteTargets": ["str"], + "routeTargets": { + "exportIpv4RouteTargets": ["str"], + "exportIpv6RouteTargets": ["str"], + "importIpv4RouteTargets": ["str"], + "importIpv6RouteTargets": ["str"], + }, }, + "peeringOption": "str", }, - "peeringOption": "str", + }, + "qosConfiguration": {"qosConfigurationState": "str"}, + "rackCount": 0, + "serverCountPerRack": 0, + "storageAccountConfiguration": { + "storageAccountId": "str", + "storageAccountIdentity": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + }, + "terminalServerConfiguration": { + "password": "str", + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "serialNumber": "str", + "username": "str", + }, + "trustedIpPrefixes": ["str"], + "uniqueRdConfiguration": { + "nniDerivedUniqueRdConfigurationState": "str", + "uniqueRdConfigurationState": "str", }, }, - "rackCount": 0, - "serverCountPerRack": 0, "tags": {"str": "str"}, - "terminalServerConfiguration": { - "password": "str", - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "serialNumber": "str", - "username": "str", - }, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -243,7 +301,6 @@ async def test_network_fabrics_begin_delete(self, resource_group): await self.client.network_fabrics.begin_delete( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -255,7 +312,6 @@ async def test_network_fabrics_begin_delete(self, resource_group): async def test_network_fabrics_list_by_resource_group(self, resource_group): response = self.client.network_fabrics.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -264,9 +320,7 @@ async def test_network_fabrics_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_fabrics_list_by_subscription(self, resource_group): - response = self.client.network_fabrics.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_fabrics.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -278,7 +332,6 @@ async def test_network_fabrics_begin_provision(self, resource_group): await self.client.network_fabrics.begin_provision( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -292,7 +345,6 @@ async def test_network_fabrics_begin_deprovision(self, resource_group): await self.client.network_fabrics.begin_deprovision( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -307,7 +359,6 @@ async def test_network_fabrics_begin_upgrade(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", body={"action": "str", "version": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -321,7 +372,6 @@ async def test_network_fabrics_begin_refresh_configuration(self, resource_group) await self.client.network_fabrics.begin_refresh_configuration( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -336,7 +386,6 @@ async def test_network_fabrics_begin_update_workload_management_bfd_configuratio resource_group_name=resource_group.name, network_fabric_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -351,7 +400,6 @@ async def test_network_fabrics_begin_update_infra_management_bfd_configuration(s resource_group_name=resource_group.name, network_fabric_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -366,7 +414,6 @@ async def test_network_fabrics_begin_validate_configuration(self, resource_group resource_group_name=resource_group.name, network_fabric_name="str", body={"validateAction": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -380,7 +427,6 @@ async def test_network_fabrics_begin_get_topology(self, resource_group): await self.client.network_fabrics.begin_get_topology( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -394,7 +440,126 @@ async def test_network_fabrics_begin_commit_configuration(self, resource_group): await self.client.network_fabrics.begin_commit_configuration( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_commit_batch_status(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_commit_batch_status( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"commitBatchId": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_discard_commit_batch(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_discard_commit_batch( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"commitBatchId": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_lock_fabric(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_lock_fabric( + resource_group_name=resource_group.name, + network_fabric_name="str", + body={"action": "str", "lockType": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_view_device_configuration(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_view_device_configuration( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_arm_configuration_diff(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_arm_configuration_diff( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_rotate_passwords(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_rotate_passwords( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_resync_passwords(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_resync_passwords( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_rotate_certificates(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_rotate_certificates( + resource_group_name=resource_group.name, + network_fabric_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_fabrics_begin_resync_certificates(self, resource_group): + response = await ( + await self.client.network_fabrics.begin_resync_certificates( + resource_group_name=resource_group.name, + network_fabric_name="str", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py index ef280cdf3d4f..c5b32f5e5967 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,18 @@ class TestManagedNetworkFabricMgmtNetworkInterfacesOperations(AzureMgmtRecordedT def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_interfaces_get(self, resource_group): + response = self.client.network_interfaces.get( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_interfaces_begin_create(self, resource_group): @@ -26,16 +38,29 @@ def test_network_interfaces_begin_create(self, resource_group): network_device_name="str", network_interface_name="str", body={ - "administrativeState": "str", - "annotation": "str", - "connectedTo": "str", + "properties": { + "additionalDescription": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "connectedTo": "str", + "description": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + }, "id": "str", - "interfaceType": "str", - "ipv4Address": "str", - "ipv6Address": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "physicalIdentifier": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,25 +71,11 @@ def test_network_interfaces_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_interfaces_get(self, resource_group): - response = self.client.network_interfaces.get( - resource_group_name=resource_group.name, - network_device_name="str", - network_interface_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_interfaces_begin_update(self, resource_group): @@ -72,8 +83,13 @@ def test_network_interfaces_begin_update(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", network_interface_name="str", - body={"annotation": "str"}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": {"additionalDescription": "str", "annotation": "str"}, + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -86,7 +102,6 @@ def test_network_interfaces_begin_delete(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", network_interface_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -98,7 +113,6 @@ def test_network_interfaces_list_by_network_device(self, resource_group): response = self.client.network_interfaces.list_by_network_device( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -112,7 +126,6 @@ def test_network_interfaces_begin_update_administrative_state(self, resource_gro network_device_name="str", network_interface_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py index 052af38c395c..a4c893c6ed72 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_interfaces_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,18 @@ class TestManagedNetworkFabricMgmtNetworkInterfacesOperationsAsync(AzureMgmtReco def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_interfaces_get(self, resource_group): + response = await self.client.network_interfaces.get( + resource_group_name=resource_group.name, + network_device_name="str", + network_interface_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_interfaces_begin_create(self, resource_group): @@ -28,16 +40,29 @@ async def test_network_interfaces_begin_create(self, resource_group): network_device_name="str", network_interface_name="str", body={ - "administrativeState": "str", - "annotation": "str", - "connectedTo": "str", + "properties": { + "additionalDescription": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "connectedTo": "str", + "description": "str", + "interfaceType": "str", + "ipv4Address": "str", + "ipv6Address": "str", + "lastOperation": {"details": "str"}, + "networkFabricId": "str", + "physicalIdentifier": "str", + "provisioningState": "str", + }, "id": "str", - "interfaceType": "str", - "ipv4Address": "str", - "ipv6Address": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "physicalIdentifier": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -48,26 +73,12 @@ async def test_network_interfaces_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_interfaces_get(self, resource_group): - response = await self.client.network_interfaces.get( - resource_group_name=resource_group.name, - network_device_name="str", - network_interface_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_interfaces_begin_update(self, resource_group): @@ -76,8 +87,13 @@ async def test_network_interfaces_begin_update(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", network_interface_name="str", - body={"annotation": "str"}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": {"additionalDescription": "str", "annotation": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result @@ -92,7 +108,6 @@ async def test_network_interfaces_begin_delete(self, resource_group): resource_group_name=resource_group.name, network_device_name="str", network_interface_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -105,7 +120,6 @@ async def test_network_interfaces_list_by_network_device(self, resource_group): response = self.client.network_interfaces.list_by_network_device( resource_group_name=resource_group.name, network_device_name="str", - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -120,7 +134,6 @@ async def test_network_interfaces_begin_update_administrative_state(self, resour network_device_name="str", network_interface_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations.py new file mode 100644 index 000000000000..e639e700bf72 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations.py @@ -0,0 +1,148 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkMonitorsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_get(self, resource_group): + response = self.client.network_monitors.get( + resource_group_name=resource_group.name, + network_monitor_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_begin_create(self, resource_group): + response = self.client.network_monitors.begin_create( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={ + "location": "str", + "properties": { + "administrativeState": "str", + "annotation": "str", + "bmpConfiguration": { + "exportPolicy": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "monitoredAddressFamilies": ["str"], + "monitoredNetworks": ["str"], + "scopeResourceId": "str", + "stationConfigurationState": "str", + "stationConnectionMode": "str", + "stationConnectionProperties": {"keepaliveIdleTime": 0, "probeCount": 0, "probeInterval": 0}, + "stationIp": "str", + "stationName": "str", + "stationNetwork": "str", + "stationPort": 0, + }, + "configurationState": "str", + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_begin_update(self, resource_group): + response = self.client.network_monitors.begin_update( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={ + "properties": { + "bmpConfiguration": { + "exportPolicy": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "monitoredAddressFamilies": ["str"], + "monitoredNetworks": ["str"], + "scopeResourceId": "str", + "stationConfigurationState": "str", + "stationConnectionMode": "str", + "stationConnectionProperties": {"keepaliveIdleTime": 0, "probeCount": 0, "probeInterval": 0}, + "stationIp": "str", + "stationName": "str", + "stationNetwork": "str", + "stationPort": 0, + } + }, + "tags": {"str": "str"}, + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_begin_delete(self, resource_group): + response = self.client.network_monitors.begin_delete( + resource_group_name=resource_group.name, + network_monitor_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_list_by_resource_group(self, resource_group): + response = self.client.network_monitors.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_list_by_subscription(self, resource_group): + response = self.client.network_monitors.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_monitors_begin_update_administrative_state(self, resource_group): + response = self.client.network_monitors.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations_async.py new file mode 100644 index 000000000000..eb8f33046472 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_monitors_operations_async.py @@ -0,0 +1,165 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.managednetworkfabric.aio import ManagedNetworkFabricMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestManagedNetworkFabricMgmtNetworkMonitorsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_get(self, resource_group): + response = await self.client.network_monitors.get( + resource_group_name=resource_group.name, + network_monitor_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_begin_create(self, resource_group): + response = await ( + await self.client.network_monitors.begin_create( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={ + "location": "str", + "properties": { + "administrativeState": "str", + "annotation": "str", + "bmpConfiguration": { + "exportPolicy": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "monitoredAddressFamilies": ["str"], + "monitoredNetworks": ["str"], + "scopeResourceId": "str", + "stationConfigurationState": "str", + "stationConnectionMode": "str", + "stationConnectionProperties": { + "keepaliveIdleTime": 0, + "probeCount": 0, + "probeInterval": 0, + }, + "stationIp": "str", + "stationName": "str", + "stationNetwork": "str", + "stationPort": 0, + }, + "configurationState": "str", + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_begin_update(self, resource_group): + response = await ( + await self.client.network_monitors.begin_update( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={ + "properties": { + "bmpConfiguration": { + "exportPolicy": "str", + "exportPolicyConfiguration": {"exportPolicies": ["str"]}, + "monitoredAddressFamilies": ["str"], + "monitoredNetworks": ["str"], + "scopeResourceId": "str", + "stationConfigurationState": "str", + "stationConnectionMode": "str", + "stationConnectionProperties": { + "keepaliveIdleTime": 0, + "probeCount": 0, + "probeInterval": 0, + }, + "stationIp": "str", + "stationName": "str", + "stationNetwork": "str", + "stationPort": 0, + } + }, + "tags": {"str": "str"}, + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_begin_delete(self, resource_group): + response = await ( + await self.client.network_monitors.begin_delete( + resource_group_name=resource_group.name, + network_monitor_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_list_by_resource_group(self, resource_group): + response = self.client.network_monitors.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_list_by_subscription(self, resource_group): + response = self.client.network_monitors.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_monitors_begin_update_administrative_state(self, resource_group): + response = await ( + await self.client.network_monitors.begin_update_administrative_state( + resource_group_name=resource_group.name, + network_monitor_name="str", + body={"resourceIds": ["str"], "state": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py index 89054b5c3c22..092e3d397908 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkPacketBrokersOperations(AzureMgmtRecord def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_packet_brokers_get(self, resource_group): + response = self.client.network_packet_brokers.get( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_packet_brokers_begin_create(self, resource_group): @@ -26,14 +37,24 @@ def test_network_packet_brokers_begin_create(self, resource_group): network_packet_broker_name="str", body={ "location": "str", - "networkFabricId": "str", + "properties": { + "networkFabricId": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "neighborGroupIds": ["str"], + "networkDeviceIds": ["str"], + "networkTapIds": ["str"], + "provisioningState": "str", + "sourceInterfaceIds": ["str"], + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "neighborGroupIds": ["str"], - "networkDeviceIds": ["str"], - "networkTapIds": ["str"], - "provisioningState": "str", - "sourceInterfaceIds": ["str"], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -45,32 +66,24 @@ def test_network_packet_brokers_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_packet_brokers_get(self, resource_group): - response = self.client.network_packet_brokers.get( - resource_group_name=resource_group.name, - network_packet_broker_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_packet_brokers_begin_update(self, resource_group): response = self.client.network_packet_brokers.begin_update( resource_group_name=resource_group.name, network_packet_broker_name="str", - body={"tags": {"str": "str"}}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "tags": {"str": "str"}, + }, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,7 +95,6 @@ def test_network_packet_brokers_begin_delete(self, resource_group): response = self.client.network_packet_brokers.begin_delete( resource_group_name=resource_group.name, network_packet_broker_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,7 +105,6 @@ def test_network_packet_brokers_begin_delete(self, resource_group): def test_network_packet_brokers_list_by_resource_group(self, resource_group): response = self.client.network_packet_brokers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -102,9 +113,7 @@ def test_network_packet_brokers_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_packet_brokers_list_by_subscription(self, resource_group): - response = self.client.network_packet_brokers.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_packet_brokers.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py index b726f6dfd0a0..ee1e46168ad9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_packet_brokers_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkPacketBrokersOperationsAsync(AzureMgmtR def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_packet_brokers_get(self, resource_group): + response = await self.client.network_packet_brokers.get( + resource_group_name=resource_group.name, + network_packet_broker_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_packet_brokers_begin_create(self, resource_group): @@ -28,14 +39,24 @@ async def test_network_packet_brokers_begin_create(self, resource_group): network_packet_broker_name="str", body={ "location": "str", - "networkFabricId": "str", + "properties": { + "networkFabricId": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "neighborGroupIds": ["str"], + "networkDeviceIds": ["str"], + "networkTapIds": ["str"], + "provisioningState": "str", + "sourceInterfaceIds": ["str"], + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "neighborGroupIds": ["str"], - "networkDeviceIds": ["str"], - "networkTapIds": ["str"], - "provisioningState": "str", - "sourceInterfaceIds": ["str"], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -47,25 +68,12 @@ async def test_network_packet_brokers_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_packet_brokers_get(self, resource_group): - response = await self.client.network_packet_brokers.get( - resource_group_name=resource_group.name, - network_packet_broker_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_packet_brokers_begin_update(self, resource_group): @@ -73,8 +81,13 @@ async def test_network_packet_brokers_begin_update(self, resource_group): await self.client.network_packet_brokers.begin_update( resource_group_name=resource_group.name, network_packet_broker_name="str", - body={"tags": {"str": "str"}}, - api_version="2023-06-15", + body={ + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "tags": {"str": "str"}, + }, ) ).result() # call '.result()' to poll until service return final result @@ -88,7 +101,6 @@ async def test_network_packet_brokers_begin_delete(self, resource_group): await self.client.network_packet_brokers.begin_delete( resource_group_name=resource_group.name, network_packet_broker_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -100,7 +112,6 @@ async def test_network_packet_brokers_begin_delete(self, resource_group): async def test_network_packet_brokers_list_by_resource_group(self, resource_group): response = self.client.network_packet_brokers.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -109,9 +120,7 @@ async def test_network_packet_brokers_list_by_resource_group(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_packet_brokers_list_by_subscription(self, resource_group): - response = self.client.network_packet_brokers.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_packet_brokers.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py index 5651179314ab..663e11f8149f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkRacksOperations(AzureMgmtRecordedTestCa def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_racks_get(self, resource_group): + response = self.client.network_racks.get( + resource_group_name=resource_group.name, + network_rack_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_racks_begin_create(self, resource_group): @@ -26,13 +37,17 @@ def test_network_racks_begin_create(self, resource_group): network_rack_name="str", body={ "location": "str", - "networkFabricId": "str", - "annotation": "str", + "properties": { + "networkFabricId": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkDevices": ["str"], + "networkRackType": "str", + "provisioningState": "str", + }, "id": "str", "name": "str", - "networkDevices": ["str"], - "networkRackType": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -44,24 +59,11 @@ def test_network_racks_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_racks_get(self, resource_group): - response = self.client.network_racks.get( - resource_group_name=resource_group.name, - network_rack_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_racks_begin_update(self, resource_group): @@ -69,7 +71,6 @@ def test_network_racks_begin_update(self, resource_group): resource_group_name=resource_group.name, network_rack_name="str", body={"tags": {"str": "str"}}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -81,7 +82,6 @@ def test_network_racks_begin_delete(self, resource_group): response = self.client.network_racks.begin_delete( resource_group_name=resource_group.name, network_rack_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -92,7 +92,6 @@ def test_network_racks_begin_delete(self, resource_group): def test_network_racks_list_by_resource_group(self, resource_group): response = self.client.network_racks.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -101,9 +100,7 @@ def test_network_racks_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_racks_list_by_subscription(self, resource_group): - response = self.client.network_racks.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_racks.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py index decdef317471..1a197004e093 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_racks_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkRacksOperationsAsync(AzureMgmtRecordedT def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_racks_get(self, resource_group): + response = await self.client.network_racks.get( + resource_group_name=resource_group.name, + network_rack_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_racks_begin_create(self, resource_group): @@ -28,13 +39,17 @@ async def test_network_racks_begin_create(self, resource_group): network_rack_name="str", body={ "location": "str", - "networkFabricId": "str", - "annotation": "str", + "properties": { + "networkFabricId": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkDevices": ["str"], + "networkRackType": "str", + "provisioningState": "str", + }, "id": "str", "name": "str", - "networkDevices": ["str"], - "networkRackType": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -46,25 +61,12 @@ async def test_network_racks_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_racks_get(self, resource_group): - response = await self.client.network_racks.get( - resource_group_name=resource_group.name, - network_rack_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_racks_begin_update(self, resource_group): @@ -73,7 +75,6 @@ async def test_network_racks_begin_update(self, resource_group): resource_group_name=resource_group.name, network_rack_name="str", body={"tags": {"str": "str"}}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -87,7 +88,6 @@ async def test_network_racks_begin_delete(self, resource_group): await self.client.network_racks.begin_delete( resource_group_name=resource_group.name, network_rack_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -99,7 +99,6 @@ async def test_network_racks_begin_delete(self, resource_group): async def test_network_racks_list_by_resource_group(self, resource_group): response = self.client.network_racks.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -108,9 +107,7 @@ async def test_network_racks_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_racks_list_by_subscription(self, resource_group): - response = self.client.network_racks.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_racks.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py index 361845fcf73b..c508e4eb16a7 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkTapRulesOperations(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_tap_rules_get(self, resource_group): + response = self.client.network_tap_rules.get( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_tap_rules_begin_create(self, resource_group): @@ -26,62 +37,76 @@ def test_network_tap_rules_begin_create(self, resource_group): network_tap_rule_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "configurationType": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "id": "str", - "lastSyncedTime": "2020-02-20 00:00:00", - "matchConfigurations": [ - { - "actions": [ - { - "destinationId": "str", - "isTimestampEnabled": "str", - "matchConfigurationName": "str", - "truncate": "str", - "type": "str", - } - ], - "ipAddressType": "str", - "matchConditions": [ - { - "encapsulationType": "None", - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "configurationType": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalNetworkTapRuleActions": {"enableCount": "str", "truncate": "str"}, + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "lastOperation": {"details": "str"}, + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", "type": "str", - }, - "portCondition": { - "layer4Protocol": "str", - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "str", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "networkFabricIds": ["str"], + "networkTapId": "str", + "networkTapIds": ["str"], + "pollingIntervalInSeconds": 0, + "provisioningState": "str", + "tapRulesUrl": "str", + }, + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkTapId": "str", - "pollingIntervalInSeconds": 30, - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -91,27 +116,13 @@ def test_network_tap_rules_begin_create(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "tapRulesUrl": "str", "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_tap_rules_get(self, resource_group): - response = self.client.network_tap_rules.get( - resource_group_name=resource_group.name, - network_tap_rule_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_tap_rules_begin_update(self, resource_group): @@ -119,58 +130,65 @@ def test_network_tap_rules_begin_update(self, resource_group): resource_group_name=resource_group.name, network_tap_rule_name="str", body={ - "annotation": "str", - "configurationType": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "matchConfigurations": [ - { - "actions": [ - { - "destinationId": "str", - "isTimestampEnabled": "str", - "matchConfigurationName": "str", - "truncate": "str", - "type": "str", - } - ], - "ipAddressType": "str", - "matchConditions": [ - { - "encapsulationType": "None", - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalNetworkTapRuleActions": {"enableCount": "str", "truncate": "str"}, + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", "type": "str", - }, - "portCondition": { - "layer4Protocol": "str", - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "str", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tapRulesUrl": "str", + }, "tags": {"str": "str"}, - "tapRulesUrl": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -182,7 +200,6 @@ def test_network_tap_rules_begin_delete(self, resource_group): response = self.client.network_tap_rules.begin_delete( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -193,7 +210,6 @@ def test_network_tap_rules_begin_delete(self, resource_group): def test_network_tap_rules_list_by_resource_group(self, resource_group): response = self.client.network_tap_rules.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -202,9 +218,7 @@ def test_network_tap_rules_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_tap_rules_list_by_subscription(self, resource_group): - response = self.client.network_tap_rules.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_tap_rules.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -216,7 +230,6 @@ def test_network_tap_rules_begin_update_administrative_state(self, resource_grou resource_group_name=resource_group.name, network_tap_rule_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -228,7 +241,6 @@ def test_network_tap_rules_begin_resync(self, resource_group): response = self.client.network_tap_rules.begin_resync( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -240,7 +252,6 @@ def test_network_tap_rules_begin_validate_configuration(self, resource_group): response = self.client.network_tap_rules.begin_validate_configuration( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py index 997d945646fc..b5562cf27705 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_tap_rules_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkTapRulesOperationsAsync(AzureMgmtRecord def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_tap_rules_get(self, resource_group): + response = await self.client.network_tap_rules.get( + resource_group_name=resource_group.name, + network_tap_rule_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_tap_rules_begin_create(self, resource_group): @@ -28,62 +39,76 @@ async def test_network_tap_rules_begin_create(self, resource_group): network_tap_rule_name="str", body={ "location": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "configurationType": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "id": "str", - "lastSyncedTime": "2020-02-20 00:00:00", - "matchConfigurations": [ - { - "actions": [ - { - "destinationId": "str", - "isTimestampEnabled": "str", - "matchConfigurationName": "str", - "truncate": "str", - "type": "str", - } - ], - "ipAddressType": "str", - "matchConditions": [ - { - "encapsulationType": "None", - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "properties": { + "configurationType": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalNetworkTapRuleActions": {"enableCount": "str", "truncate": "str"}, + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "lastOperation": {"details": "str"}, + "lastSyncedTime": "2020-02-20 00:00:00", + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", "type": "str", - }, - "portCondition": { - "layer4Protocol": "str", - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "str", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "networkFabricIds": ["str"], + "networkTapId": "str", + "networkTapIds": ["str"], + "pollingIntervalInSeconds": 0, + "provisioningState": "str", + "tapRulesUrl": "str", + }, + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "networkTapId": "str", - "pollingIntervalInSeconds": 30, - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -93,28 +118,14 @@ async def test_network_tap_rules_begin_create(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "tapRulesUrl": "str", "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_tap_rules_get(self, resource_group): - response = await self.client.network_tap_rules.get( - resource_group_name=resource_group.name, - network_tap_rule_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_tap_rules_begin_update(self, resource_group): @@ -123,58 +134,65 @@ async def test_network_tap_rules_begin_update(self, resource_group): resource_group_name=resource_group.name, network_tap_rule_name="str", body={ - "annotation": "str", - "configurationType": "str", - "dynamicMatchConfigurations": [ - { - "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], - "portGroups": [{"name": "str", "ports": ["str"]}], - "vlanGroups": [{"name": "str", "vlans": ["str"]}], - } - ], - "matchConfigurations": [ - { - "actions": [ - { - "destinationId": "str", - "isTimestampEnabled": "str", - "matchConfigurationName": "str", - "truncate": "str", - "type": "str", - } - ], - "ipAddressType": "str", - "matchConditions": [ - { - "encapsulationType": "None", - "ipCondition": { - "ipGroupNames": ["str"], - "ipPrefixValues": ["str"], - "prefixType": "str", + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "configurationType": "str", + "dynamicMatchConfigurations": [ + { + "ipGroups": [{"ipAddressType": "str", "ipPrefixes": ["str"], "name": "str"}], + "portGroups": [{"name": "str", "ports": ["str"]}], + "vlanGroups": [{"name": "str", "vlans": ["str"]}], + } + ], + "globalNetworkTapRuleActions": {"enableCount": "str", "truncate": "str"}, + "identitySelector": {"identityType": "str", "userAssignedIdentityResourceId": "str"}, + "matchConfigurations": [ + { + "actions": [ + { + "destinationId": "str", + "isTimestampEnabled": "str", + "matchConfigurationName": "str", + "truncate": "str", "type": "str", - }, - "portCondition": { - "layer4Protocol": "str", - "portGroupNames": ["str"], - "portType": "str", - "ports": ["str"], - }, - "protocolTypes": ["str"], - "vlanMatchCondition": { - "innerVlans": ["str"], - "vlanGroupNames": ["str"], - "vlans": ["str"], - }, - } - ], - "matchConfigurationName": "str", - "sequenceNumber": 0, - } - ], + } + ], + "ipAddressType": "str", + "matchConditions": [ + { + "encapsulationType": "str", + "ipCondition": { + "ipGroupNames": ["str"], + "ipPrefixValues": ["str"], + "prefixType": "str", + "type": "str", + }, + "portCondition": { + "layer4Protocol": "str", + "portGroupNames": ["str"], + "portType": "str", + "ports": ["str"], + }, + "protocolTypes": ["str"], + "vlanMatchCondition": { + "innerVlans": ["str"], + "vlanGroupNames": ["str"], + "vlans": ["str"], + }, + } + ], + "matchConfigurationName": "str", + "sequenceNumber": 0, + } + ], + "tapRulesUrl": "str", + }, "tags": {"str": "str"}, - "tapRulesUrl": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -188,7 +206,6 @@ async def test_network_tap_rules_begin_delete(self, resource_group): await self.client.network_tap_rules.begin_delete( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -200,7 +217,6 @@ async def test_network_tap_rules_begin_delete(self, resource_group): async def test_network_tap_rules_list_by_resource_group(self, resource_group): response = self.client.network_tap_rules.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -209,9 +225,7 @@ async def test_network_tap_rules_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_tap_rules_list_by_subscription(self, resource_group): - response = self.client.network_tap_rules.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_tap_rules.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -224,7 +238,6 @@ async def test_network_tap_rules_begin_update_administrative_state(self, resourc resource_group_name=resource_group.name, network_tap_rule_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -238,7 +251,6 @@ async def test_network_tap_rules_begin_resync(self, resource_group): await self.client.network_tap_rules.begin_resync( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -252,7 +264,6 @@ async def test_network_tap_rules_begin_validate_configuration(self, resource_gro await self.client.network_tap_rules.begin_validate_configuration( resource_group_name=resource_group.name, network_tap_rule_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py index 8d10c29448ae..9a13b5e09c1a 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtNetworkTapsOperations(AzureMgmtRecordedTestCas def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_taps_get(self, resource_group): + response = self.client.network_taps.get( + resource_group_name=resource_group.name, + network_tap_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_taps_begin_create(self, resource_group): @@ -25,25 +36,35 @@ def test_network_taps_begin_create(self, resource_group): resource_group_name=resource_group.name, network_tap_name="str", body={ - "destinations": [ - { - "destinationId": "str", - "destinationTapRuleId": "str", - "destinationType": "str", - "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, - "name": "str", - } - ], "location": "str", - "networkPacketBrokerId": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "destinations": [ + { + "destinationId": "str", + "destinationType": "str", + "name": "str", + "destinationTapRuleId": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + } + ], + "networkPacketBrokerId": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricIds": ["str"], + "pollingType": "str", + "provisioningState": "str", + "sourceTapRuleId": "str", + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "pollingType": "str", - "provisioningState": "str", - "sourceTapRuleId": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -55,24 +76,11 @@ def test_network_taps_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_taps_get(self, resource_group): - response = self.client.network_taps.get( - resource_group_name=resource_group.name, - network_tap_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_taps_begin_update(self, resource_group): @@ -80,20 +88,25 @@ def test_network_taps_begin_update(self, resource_group): resource_group_name=resource_group.name, network_tap_name="str", body={ - "annotation": "str", - "destinations": [ - { - "destinationId": "str", - "destinationTapRuleId": "str", - "destinationType": "str", - "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, - "name": "str", - } - ], - "pollingType": "str", + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "pollingType": "str", + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -105,7 +118,6 @@ def test_network_taps_begin_delete(self, resource_group): response = self.client.network_taps.begin_delete( resource_group_name=resource_group.name, network_tap_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -116,7 +128,6 @@ def test_network_taps_begin_delete(self, resource_group): def test_network_taps_list_by_resource_group(self, resource_group): response = self.client.network_taps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -125,9 +136,7 @@ def test_network_taps_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_taps_list_by_subscription(self, resource_group): - response = self.client.network_taps.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_taps.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -139,7 +148,6 @@ def test_network_taps_begin_update_administrative_state(self, resource_group): resource_group_name=resource_group.name, network_tap_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -151,7 +159,6 @@ def test_network_taps_begin_resync(self, resource_group): response = self.client.network_taps.begin_resync( resource_group_name=resource_group.name, network_tap_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py index 8c7048da3718..3564b548c00f 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_taps_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtNetworkTapsOperationsAsync(AzureMgmtRecordedTe def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_taps_get(self, resource_group): + response = await self.client.network_taps.get( + resource_group_name=resource_group.name, + network_tap_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_taps_begin_create(self, resource_group): @@ -27,25 +38,35 @@ async def test_network_taps_begin_create(self, resource_group): resource_group_name=resource_group.name, network_tap_name="str", body={ - "destinations": [ - { - "destinationId": "str", - "destinationTapRuleId": "str", - "destinationType": "str", - "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, - "name": "str", - } - ], "location": "str", - "networkPacketBrokerId": "str", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", + "properties": { + "destinations": [ + { + "destinationId": "str", + "destinationType": "str", + "name": "str", + "destinationTapRuleId": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + } + ], + "networkPacketBrokerId": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "lastOperation": {"details": "str"}, + "networkFabricIds": ["str"], + "pollingType": "str", + "provisioningState": "str", + "sourceTapRuleId": "str", + }, "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, "name": "str", - "pollingType": "str", - "provisioningState": "str", - "sourceTapRuleId": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -57,25 +78,12 @@ async def test_network_taps_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_taps_get(self, resource_group): - response = await self.client.network_taps.get( - resource_group_name=resource_group.name, - network_tap_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_taps_begin_update(self, resource_group): @@ -84,20 +92,25 @@ async def test_network_taps_begin_update(self, resource_group): resource_group_name=resource_group.name, network_tap_name="str", body={ - "annotation": "str", - "destinations": [ - { - "destinationId": "str", - "destinationTapRuleId": "str", - "destinationType": "str", - "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, - "name": "str", - } - ], - "pollingType": "str", + "identity": { + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "properties": { + "annotation": "str", + "destinations": [ + { + "destinationId": "str", + "destinationTapRuleId": "str", + "destinationType": "str", + "isolationDomainProperties": {"encapsulation": "str", "neighborGroupIds": ["str"]}, + "name": "str", + } + ], + "pollingType": "str", + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -111,7 +124,6 @@ async def test_network_taps_begin_delete(self, resource_group): await self.client.network_taps.begin_delete( resource_group_name=resource_group.name, network_tap_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -123,7 +135,6 @@ async def test_network_taps_begin_delete(self, resource_group): async def test_network_taps_list_by_resource_group(self, resource_group): response = self.client.network_taps.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -132,9 +143,7 @@ async def test_network_taps_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_taps_list_by_subscription(self, resource_group): - response = self.client.network_taps.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.network_taps.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -147,7 +156,6 @@ async def test_network_taps_begin_update_administrative_state(self, resource_gro resource_group_name=resource_group.name, network_tap_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -161,7 +169,6 @@ async def test_network_taps_begin_resync(self, resource_group): await self.client.network_taps.begin_resync( resource_group_name=resource_group.name, network_tap_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py index 97c9f9087080..344e8a0cfcb6 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,18 @@ class TestManagedNetworkFabricMgmtNetworkToNetworkInterconnectsOperations(AzureM def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_get(self, resource_group): + response = self.client.network_to_network_interconnects.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_to_network_interconnects_begin_create(self, resource_group): @@ -26,37 +38,57 @@ def test_network_to_network_interconnects_begin_create(self, resource_group): network_fabric_name="str", network_to_network_interconnect_name="str", body={ - "useOptionB": "str", - "administrativeState": "str", - "configurationState": "str", - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "ingressAclId": "str", - "isManagementType": "True", - "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, - "name": "str", - "nniType": "CE", - "npbStaticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "useOptionB": "str", + "administrativeState": "str", + "conditionalDefaultRouteConfiguration": { + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "configurationState": "str", + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isManagementType": "str", + "lastOperation": {"details": "str"}, + "layer2Configuration": {"interfaces": ["str"], "mtu": 0}, + "microBfdState": "str", + "nniType": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "peerASN": 0, + "vlanId": 0, + "bmpConfiguration": {"configurationState": "str"}, + "fabricASN": 0, + "peLoopbackIpAddress": ["str"], + "prefixLimits": [{"maximumRoutes": 0}], + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + }, + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, - "optionBLayer3Configuration": { - "fabricASN": 0, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, }, - "provisioningState": "str", + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -67,25 +99,11 @@ def test_network_to_network_interconnects_begin_create(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_network_to_network_interconnects_get(self, resource_group): - response = self.client.network_to_network_interconnects.get( - resource_group_name=resource_group.name, - network_fabric_name="str", - network_to_network_interconnect_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_network_to_network_interconnects_begin_update(self, resource_group): @@ -94,30 +112,44 @@ def test_network_to_network_interconnects_begin_update(self, resource_group): network_fabric_name="str", network_to_network_interconnect_name="str", body={ - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "ingressAclId": "str", - "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, - "name": "str", - "npbStaticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "layer2Configuration": {"interfaces": ["str"], "mtu": 0}, + "microBfdState": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "bmpConfiguration": {"configurationState": "str"}, + "fabricASN": 0, + "peLoopbackIpAddress": ["str"], + "peerASN": 0, + "prefixLimits": [{"maximumRoutes": 0}], + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, - "optionBLayer3Configuration": { - "fabricASN": 0, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -129,7 +161,6 @@ def test_network_to_network_interconnects_begin_update(self, resource_group): }, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -142,7 +173,6 @@ def test_network_to_network_interconnects_begin_delete(self, resource_group): resource_group_name=resource_group.name, network_fabric_name="str", network_to_network_interconnect_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -154,7 +184,6 @@ def test_network_to_network_interconnects_list_by_network_fabric(self, resource_ response = self.client.network_to_network_interconnects.list_by_network_fabric( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -170,7 +199,6 @@ def test_network_to_network_interconnects_begin_update_npb_static_route_bfd_admi network_fabric_name="str", network_to_network_interconnect_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -184,7 +212,19 @@ def test_network_to_network_interconnects_begin_update_administrative_state(self network_fabric_name="str", network_to_network_interconnect_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_network_to_network_interconnects_begin_update_bfd_administrative_state(self, resource_group): + response = self.client.network_to_network_interconnects.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"administrativeState": "str", "routeType": "str"}, ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py index f744ae0e7a55..be020ff12b77 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_network_to_network_interconnects_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,18 @@ class TestManagedNetworkFabricMgmtNetworkToNetworkInterconnectsOperationsAsync(A def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_get(self, resource_group): + response = await self.client.network_to_network_interconnects.get( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_to_network_interconnects_begin_create(self, resource_group): @@ -28,37 +40,57 @@ async def test_network_to_network_interconnects_begin_create(self, resource_grou network_fabric_name="str", network_to_network_interconnect_name="str", body={ - "useOptionB": "str", - "administrativeState": "str", - "configurationState": "str", - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, - "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "ingressAclId": "str", - "isManagementType": "True", - "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, - "name": "str", - "nniType": "CE", - "npbStaticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "useOptionB": "str", + "administrativeState": "str", + "conditionalDefaultRouteConfiguration": { + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "configurationState": "str", + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "isManagementType": "str", + "lastOperation": {"details": "str"}, + "layer2Configuration": {"interfaces": ["str"], "mtu": 0}, + "microBfdState": "str", + "nniType": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "peerASN": 0, + "vlanId": 0, + "bmpConfiguration": {"configurationState": "str"}, + "fabricASN": 0, + "peLoopbackIpAddress": ["str"], + "prefixLimits": [{"maximumRoutes": 0}], + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + }, + "provisioningState": "str", + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, - "optionBLayer3Configuration": { - "fabricASN": 0, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, }, - "provisioningState": "str", + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,26 +101,12 @@ async def test_network_to_network_interconnects_begin_create(self, resource_grou }, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_network_to_network_interconnects_get(self, resource_group): - response = await self.client.network_to_network_interconnects.get( - resource_group_name=resource_group.name, - network_fabric_name="str", - network_to_network_interconnect_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_network_to_network_interconnects_begin_update(self, resource_group): @@ -98,30 +116,44 @@ async def test_network_to_network_interconnects_begin_update(self, resource_grou network_fabric_name="str", network_to_network_interconnect_name="str", body={ - "egressAclId": "str", - "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, "id": "str", - "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, - "ingressAclId": "str", - "layer2Configuration": {"interfaces": ["str"], "mtu": 1500}, - "name": "str", - "npbStaticRouteConfiguration": { - "bfdConfiguration": { - "administrativeState": "Disabled", - "intervalInMilliSeconds": 300, - "multiplier": 5, + "properties": { + "egressAclId": "str", + "exportRoutePolicy": {"exportIpv4RoutePolicyId": "str", "exportIpv6RoutePolicyId": "str"}, + "importRoutePolicy": {"importIpv4RoutePolicyId": "str", "importIpv6RoutePolicyId": "str"}, + "ingressAclId": "str", + "layer2Configuration": {"interfaces": ["str"], "mtu": 0}, + "microBfdState": "str", + "npbStaticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], + }, + "optionBLayer3Configuration": { + "bmpConfiguration": {"configurationState": "str"}, + "fabricASN": 0, + "peLoopbackIpAddress": ["str"], + "peerASN": 0, + "prefixLimits": [{"maximumRoutes": 0}], + "primaryIpv4Prefix": "str", + "primaryIpv6Prefix": "str", + "secondaryIpv4Prefix": "str", + "secondaryIpv6Prefix": "str", + "vlanId": 0, + }, + "staticRouteConfiguration": { + "bfdConfiguration": { + "administrativeState": "str", + "intervalInMilliSeconds": 0, + "multiplier": 0, + }, + "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], + "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], }, - "ipv4Routes": [{"nextHop": ["str"], "prefix": "str"}], - "ipv6Routes": [{"nextHop": ["str"], "prefix": "str"}], - }, - "optionBLayer3Configuration": { - "fabricASN": 0, - "peerASN": 0, - "primaryIpv4Prefix": "str", - "primaryIpv6Prefix": "str", - "secondaryIpv4Prefix": "str", - "secondaryIpv6Prefix": "str", - "vlanId": 0, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -133,7 +165,6 @@ async def test_network_to_network_interconnects_begin_update(self, resource_grou }, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -148,7 +179,6 @@ async def test_network_to_network_interconnects_begin_delete(self, resource_grou resource_group_name=resource_group.name, network_fabric_name="str", network_to_network_interconnect_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -161,7 +191,6 @@ async def test_network_to_network_interconnects_list_by_network_fabric(self, res response = self.client.network_to_network_interconnects.list_by_network_fabric( resource_group_name=resource_group.name, network_fabric_name="str", - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -178,7 +207,6 @@ async def test_network_to_network_interconnects_begin_update_npb_static_route_bf network_fabric_name="str", network_to_network_interconnect_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -194,7 +222,21 @@ async def test_network_to_network_interconnects_begin_update_administrative_stat network_fabric_name="str", network_to_network_interconnect_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_network_to_network_interconnects_begin_update_bfd_administrative_state(self, resource_group): + response = await ( + await self.client.network_to_network_interconnects.begin_update_bfd_administrative_state( + resource_group_name=resource_group.name, + network_fabric_name="str", + network_to_network_interconnect_name="str", + body={"administrativeState": "str", "routeType": "str"}, ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py index 6cf5adc3a6c2..eb31ee39026e 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2023-06-15", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py index fa0dd7e1a3b9..98c08638b553 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2023-06-15", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py index a3ee27b4297c..22d71eefa8ef 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,6 +18,17 @@ class TestManagedNetworkFabricMgmtRoutePoliciesOperations(AzureMgmtRecordedTestC def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_route_policies_get(self, resource_group): + response = self.client.route_policies.get( + resource_group_name=resource_group.name, + route_policy_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_route_policies_begin_create(self, resource_group): @@ -26,41 +37,44 @@ def test_route_policies_begin_create(self, resource_group): route_policy_name="str", body={ "location": "str", - "networkFabricId": "str", - "addressFamilyType": "IPv4", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "defaultAction": "str", - "id": "str", - "name": "str", - "provisioningState": "str", - "statements": [ - { - "action": { - "actionType": "str", - "ipCommunityProperties": { - "add": {"ipCommunityIds": ["str"]}, - "delete": {"ipCommunityIds": ["str"]}, - "set": {"ipCommunityIds": ["str"]}, + "properties": { + "networkFabricId": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, }, - "ipExtendedCommunityProperties": { - "add": {"ipExtendedCommunityIds": ["str"]}, - "delete": {"ipExtendedCommunityIds": ["str"]}, - "set": {"ipExtendedCommunityIds": ["str"]}, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "str", }, - "localPreference": 0, - }, - "condition": { - "ipCommunityIds": ["str"], - "ipExtendedCommunityIds": ["str"], - "ipPrefixId": "str", - "type": "Or", - }, - "sequenceNumber": 0, - "annotation": "str", - } - ], + "sequenceNumber": 0, + "annotation": "str", + } + ], + "addressFamilyType": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "defaultAction": "str", + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -72,24 +86,11 @@ def test_route_policies_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_route_policies_get(self, resource_group): - response = self.client.route_policies.get( - resource_group_name=resource_group.name, - route_policy_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_route_policies_begin_update(self, resource_group): @@ -97,36 +98,37 @@ def test_route_policies_begin_update(self, resource_group): resource_group_name=resource_group.name, route_policy_name="str", body={ - "defaultAction": "str", - "statements": [ - { - "action": { - "actionType": "str", - "ipCommunityProperties": { - "add": {"ipCommunityIds": ["str"]}, - "delete": {"ipCommunityIds": ["str"]}, - "set": {"ipCommunityIds": ["str"]}, + "properties": { + "defaultAction": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, }, - "ipExtendedCommunityProperties": { - "add": {"ipExtendedCommunityIds": ["str"]}, - "delete": {"ipExtendedCommunityIds": ["str"]}, - "set": {"ipExtendedCommunityIds": ["str"]}, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "str", }, - "localPreference": 0, - }, - "condition": { - "ipCommunityIds": ["str"], - "ipExtendedCommunityIds": ["str"], - "ipPrefixId": "str", - "type": "Or", - }, - "sequenceNumber": 0, - "annotation": "str", - } - ], + "sequenceNumber": 0, + "annotation": "str", + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -138,7 +140,6 @@ def test_route_policies_begin_delete(self, resource_group): response = self.client.route_policies.begin_delete( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -149,7 +150,6 @@ def test_route_policies_begin_delete(self, resource_group): def test_route_policies_list_by_resource_group(self, resource_group): response = self.client.route_policies.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r for r in response] # please add some check logic here by yourself @@ -158,9 +158,7 @@ def test_route_policies_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_route_policies_list_by_subscription(self, resource_group): - response = self.client.route_policies.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.route_policies.list_by_subscription() result = [r for r in response] # please add some check logic here by yourself # ... @@ -172,7 +170,6 @@ def test_route_policies_begin_update_administrative_state(self, resource_group): resource_group_name=resource_group.name, route_policy_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -184,7 +181,6 @@ def test_route_policies_begin_validate_configuration(self, resource_group): response = self.client.route_policies.begin_validate_configuration( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -196,7 +192,6 @@ def test_route_policies_begin_commit_configuration(self, resource_group): response = self.client.route_policies.begin_commit_configuration( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py index 02d6b53d1eca..a57289362db9 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/generated_tests/test_managed_network_fabric_mgmt_route_policies_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,6 +19,17 @@ class TestManagedNetworkFabricMgmtRoutePoliciesOperationsAsync(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(ManagedNetworkFabricMgmtClient, is_async=True) + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_route_policies_get(self, resource_group): + response = await self.client.route_policies.get( + resource_group_name=resource_group.name, + route_policy_name="str", + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_route_policies_begin_create(self, resource_group): @@ -28,41 +39,44 @@ async def test_route_policies_begin_create(self, resource_group): route_policy_name="str", body={ "location": "str", - "networkFabricId": "str", - "addressFamilyType": "IPv4", - "administrativeState": "str", - "annotation": "str", - "configurationState": "str", - "defaultAction": "str", - "id": "str", - "name": "str", - "provisioningState": "str", - "statements": [ - { - "action": { - "actionType": "str", - "ipCommunityProperties": { - "add": {"ipCommunityIds": ["str"]}, - "delete": {"ipCommunityIds": ["str"]}, - "set": {"ipCommunityIds": ["str"]}, + "properties": { + "networkFabricId": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, }, - "ipExtendedCommunityProperties": { - "add": {"ipExtendedCommunityIds": ["str"]}, - "delete": {"ipExtendedCommunityIds": ["str"]}, - "set": {"ipExtendedCommunityIds": ["str"]}, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "str", }, - "localPreference": 0, - }, - "condition": { - "ipCommunityIds": ["str"], - "ipExtendedCommunityIds": ["str"], - "ipPrefixId": "str", - "type": "Or", - }, - "sequenceNumber": 0, - "annotation": "str", - } - ], + "sequenceNumber": 0, + "annotation": "str", + } + ], + "addressFamilyType": "str", + "administrativeState": "str", + "annotation": "str", + "configurationState": "str", + "defaultAction": "str", + "lastOperation": {"details": "str"}, + "provisioningState": "str", + }, + "id": "str", + "name": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -74,25 +88,12 @@ async def test_route_policies_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_route_policies_get(self, resource_group): - response = await self.client.route_policies.get( - resource_group_name=resource_group.name, - route_policy_name="str", - api_version="2023-06-15", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_route_policies_begin_update(self, resource_group): @@ -101,36 +102,37 @@ async def test_route_policies_begin_update(self, resource_group): resource_group_name=resource_group.name, route_policy_name="str", body={ - "defaultAction": "str", - "statements": [ - { - "action": { - "actionType": "str", - "ipCommunityProperties": { - "add": {"ipCommunityIds": ["str"]}, - "delete": {"ipCommunityIds": ["str"]}, - "set": {"ipCommunityIds": ["str"]}, + "properties": { + "defaultAction": "str", + "statements": [ + { + "action": { + "actionType": "str", + "ipCommunityProperties": { + "add": {"ipCommunityIds": ["str"]}, + "delete": {"ipCommunityIds": ["str"]}, + "set": {"ipCommunityIds": ["str"]}, + }, + "ipExtendedCommunityProperties": { + "add": {"ipExtendedCommunityIds": ["str"]}, + "delete": {"ipExtendedCommunityIds": ["str"]}, + "set": {"ipExtendedCommunityIds": ["str"]}, + }, + "localPreference": 0, }, - "ipExtendedCommunityProperties": { - "add": {"ipExtendedCommunityIds": ["str"]}, - "delete": {"ipExtendedCommunityIds": ["str"]}, - "set": {"ipExtendedCommunityIds": ["str"]}, + "condition": { + "ipCommunityIds": ["str"], + "ipExtendedCommunityIds": ["str"], + "ipPrefixId": "str", + "type": "str", }, - "localPreference": 0, - }, - "condition": { - "ipCommunityIds": ["str"], - "ipExtendedCommunityIds": ["str"], - "ipPrefixId": "str", - "type": "Or", - }, - "sequenceNumber": 0, - "annotation": "str", - } - ], + "sequenceNumber": 0, + "annotation": "str", + } + ], + }, "tags": {"str": "str"}, }, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -144,7 +146,6 @@ async def test_route_policies_begin_delete(self, resource_group): await self.client.route_policies.begin_delete( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -156,7 +157,6 @@ async def test_route_policies_begin_delete(self, resource_group): async def test_route_policies_list_by_resource_group(self, resource_group): response = self.client.route_policies.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-15", ) result = [r async for r in response] # please add some check logic here by yourself @@ -165,9 +165,7 @@ async def test_route_policies_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_route_policies_list_by_subscription(self, resource_group): - response = self.client.route_policies.list_by_subscription( - api_version="2023-06-15", - ) + response = self.client.route_policies.list_by_subscription() result = [r async for r in response] # please add some check logic here by yourself # ... @@ -180,7 +178,6 @@ async def test_route_policies_begin_update_administrative_state(self, resource_g resource_group_name=resource_group.name, route_policy_name="str", body={"resourceIds": ["str"], "state": "str"}, - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -194,7 +191,6 @@ async def test_route_policies_begin_validate_configuration(self, resource_group) await self.client.route_policies.begin_validate_configuration( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result @@ -208,7 +204,6 @@ async def test_route_policies_begin_commit_configuration(self, resource_group): await self.client.route_policies.begin_commit_configuration( resource_group_name=resource_group.name, route_policy_name="str", - api_version="2023-06-15", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml index 3f944bb376dd..b022c7d05f63 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/pyproject.toml @@ -17,13 +17,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = [ "azure", "azure sdk", diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/tsp-location.yaml b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/tsp-location.yaml new file mode 100644 index 000000000000..7b6780620628 --- /dev/null +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/managednetworkfabric/ManagedNetworkFabric.ResourceManager.Management +commit: e1758ffaeafcd7fd6eeaf2d45c38474b362544a6 +repo: Azure/azure-rest-api-specs +additionalDirectories: From cf36adf0c3977ac03da52ee9c8eff655bee1575d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 12:31:40 +0800 Subject: [PATCH 3/6] changelog from report comparison --- .../CHANGELOG.md | 778 +++++++++++++++++- 1 file changed, 777 insertions(+), 1 deletion(-) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md index f0a406cc1d24..b4c5fae517fa 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md @@ -2,7 +2,783 @@ ## 1.1.0 (2026-06-08) -skip changelog generation +### Features Added + + - Client `ManagedNetworkFabricMgmtClient` added method `send_request` + - Client `ManagedNetworkFabricMgmtClient` added operation group `network_monitors` + - Client `ManagedNetworkFabricMgmtClient` added operation group `network_bootstrap_devices` + - Client `ManagedNetworkFabricMgmtClient` added operation group `network_bootstrap_interfaces` + - Model `AccessControlList` added property `properties` + - Model `AccessControlListAction` added property `remark_comment` + - Model `AccessControlListAction` added property `police_rate_configuration` + - Model `AccessControlListMatchCondition` added property `protocol_neighbors` + - Model `AccessControlListMatchCondition` added property `icmp_configuration` + - Model `AccessControlListPatch` added property `properties` + - Model `AccessControlListPatchProperties` added property `control_plane_acl_configuration` + - Model `AccessControlListPatchProperties` added property `acl_type` + - Model `AccessControlListPatchProperties` added property `device_role` + - Model `AccessControlListPatchProperties` added property `global_access_control_list_actions` + - Model `AccessControlListProperties` added property `acl_type` + - Model `AccessControlListProperties` added property `device_role` + - Model `AccessControlListProperties` added property `global_access_control_list_actions` + - Model `AccessControlListProperties` added property `last_operation` + - Model `AccessControlListProperties` added property `network_fabric_ids` + - Model `AccessControlListProperties` added property `control_plane_acl_configuration` + - Enum `AclActionType` added member `POLICE_RATE` + - Enum `AclActionType` added member `REMARK` + - Enum `AdministrativeState` added member `ENABLED_DEGRADED` + - Enum `AdministrativeState` added member `UNDER_MAINTENANCE` + - Model `BgpConfiguration` added property `bmp_configuration` + - Model `BgpConfiguration` added property `v4_over_v6_bgp_session` + - Model `BgpConfiguration` added property `v6_over_v4_bgp_session` + - Enum `ConfigurationState` added member `PENDING_ADMINISTRATIVE_UPDATE` + - Enum `DeviceAdministrativeState` added member `DISABLE` + - Enum `DeviceAdministrativeState` added member `ENABLE` + - Enum `DeviceAdministrativeState` added member `UNDER_MAINTENANCE` + - Enum `DeviceAdministrativeState` added member `UNGRACEFUL_QUARANTINE` + - Enum `DeviceAdministrativeState` added member `UNGRACEFUL_RMA` + - Enum `EnableDisableState` added member `UNDER_MAINTENANCE` + - Model `ExternalNetwork` added property `properties` + - Model `ExternalNetworkPatchProperties` added property `static_route_configuration` + - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `bmp_configuration` + - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `v4_over_v6_bgp_session` + - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `v6_over_v4_bgp_session` + - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `native_ipv4_prefix_limit` + - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `native_ipv6_prefix_limit` + - Model `ExternalNetworkProperties` added property `static_route_configuration` + - Model `ExternalNetworkProperties` added property `last_operation` + - Model `ExternalNetworkProperties` added property `network_fabric_id` + - Model `ExternalNetworkPropertiesOptionAProperties` added property `bmp_configuration` + - Model `ExternalNetworkPropertiesOptionAProperties` added property `v4_over_v6_bgp_session` + - Model `ExternalNetworkPropertiesOptionAProperties` added property `v6_over_v4_bgp_session` + - Model `ExternalNetworkPropertiesOptionAProperties` added property `native_ipv4_prefix_limit` + - Model `ExternalNetworkPropertiesOptionAProperties` added property `native_ipv6_prefix_limit` + - Model `InternalNetwork` added property `properties` + - Model `InternalNetworkPatchProperties` added property `native_ipv4_prefix_limit` + - Model `InternalNetworkPatchProperties` added property `native_ipv6_prefix_limit` + - Model `InternalNetworkProperties` added property `native_ipv4_prefix_limit` + - Model `InternalNetworkProperties` added property `native_ipv6_prefix_limit` + - Model `InternalNetworkProperties` added property `last_operation` + - Model `InternalNetworkProperties` added property `network_fabric_id` + - Model `InternetGateway` added property `properties` + - Model `InternetGatewayProperties` added property `internet_gateway_type` + - Model `InternetGatewayProperties` added property `last_operation` + - Model `InternetGatewayRule` added property `properties` + - Model `InternetGatewayRuleProperties` added property `last_operation` + - Model `IpCommunity` added property `properties` + - Model `IpCommunityPatch` added property `properties` + - Model `IpCommunityProperties` added property `network_fabric_id` + - Model `IpCommunityProperties` added property `last_operation` + - Model `IpExtendedCommunity` added property `properties` + - Model `IpExtendedCommunityPatch` added property `properties` + - Model `IpExtendedCommunityProperties` added property `network_fabric_id` + - Model `IpExtendedCommunityProperties` added property `last_operation` + - Model `IpPrefix` added property `properties` + - Model `IpPrefixPatch` added property `properties` + - Model `IpPrefixProperties` added property `network_fabric_id` + - Model `IpPrefixProperties` added property `last_operation` + - Model `L2IsolationDomain` added property `properties` + - Model `L2IsolationDomain` added property `identity` + - Model `L2IsolationDomainPatch` added property `properties` + - Model `L2IsolationDomainPatch` added property `identity` + - Model `L2IsolationDomainPatchProperties` added property `extended_vlan` + - Model `L2IsolationDomainPatchProperties` added property `network_to_network_interconnect_id` + - Model `L2IsolationDomainProperties` added property `extended_vlan` + - Model `L2IsolationDomainProperties` added property `network_to_network_interconnect_id` + - Model `L2IsolationDomainProperties` added property `last_operation` + - Model `L3IsolationDomain` added property `properties` + - Model `L3IsolationDomain` added property `identity` + - Model `L3IsolationDomainPatch` added property `properties` + - Model `L3IsolationDomainPatch` added property `identity` + - Model `L3IsolationDomainPatchProperties` added property `static_route_policy` + - Model `L3IsolationDomainPatchProperties` added property `v4_route_prefix_limit` + - Model `L3IsolationDomainPatchProperties` added property `v6_route_prefix_limit` + - Model `L3IsolationDomainPatchProperties` added property `export_policy_configuration` + - Model `L3IsolationDomainProperties` added property `static_route_policy` + - Model `L3IsolationDomainProperties` added property `unique_rd_configuration` + - Model `L3IsolationDomainProperties` added property `v4_route_prefix_limit` + - Model `L3IsolationDomainProperties` added property `v6_route_prefix_limit` + - Model `L3IsolationDomainProperties` added property `last_operation` + - Model `L3IsolationDomainProperties` added property `export_policy_configuration` + - Enum `Layer4Protocol` added member `SCTP` + - Model `NeighborAddress` added property `bfd_administrative_state` + - Model `NeighborAddress` added property `bgp_administrative_state` + - Model `NeighborGroup` added property `properties` + - Model `NeighborGroup` added property `identity` + - Model `NeighborGroupPatch` added property `properties` + - Model `NeighborGroupPatch` added property `identity` + - Model `NeighborGroupProperties` added property `network_fabric_ids` + - Model `NeighborGroupProperties` added property `last_operation` + - Model `NeighborGroupProperties` added property `configuration_state` + - Model `NetworkDevice` added property `properties` + - Model `NetworkDevice` added property `identity` + - Model `NetworkDevicePatchParameters` added property `properties` + - Model `NetworkDevicePatchParameters` added property `identity` + - Model `NetworkDevicePatchParametersProperties` added property `identity_selector` + - Model `NetworkDeviceProperties` added property `identity_selector` + - Model `NetworkDeviceProperties` added property `rw_device_config` + - Model `NetworkDeviceProperties` added property `last_operation` + - Model `NetworkDeviceProperties` added property `secret_rotation_status` + - Model `NetworkDeviceProperties` added property `certificate_rotation_status` + - Model `NetworkDeviceProperties` added property `network_fabric_id` + - Model `NetworkFabric` added property `properties` + - Model `NetworkFabric` added property `identity` + - Model `NetworkFabricController` added property `properties` + - Model `NetworkFabricController` added property `identity` + - Model `NetworkFabricControllerPatch` added property `identity` + - Model `NetworkFabricControllerProperties` added property `last_operation` + - Model `NetworkFabricPatch` added property `properties` + - Model `NetworkFabricPatch` added property `identity` + - Model `NetworkFabricPatchProperties` added property `storage_account_configuration` + - Model `NetworkFabricPatchProperties` added property `hardware_alert_threshold` + - Model `NetworkFabricPatchProperties` added property `control_plane_acls` + - Model `NetworkFabricPatchProperties` added property `trusted_ip_prefixes` + - Model `NetworkFabricPatchProperties` added property `unique_rd_configuration` + - Model `NetworkFabricPatchProperties` added property `qos_configuration` + - Model `NetworkFabricPatchProperties` added property `feature_flags` + - Model `NetworkFabricPatchProperties` added property `authorized_transceiver` + - Model `NetworkFabricProperties` added property `storage_account_configuration` + - Model `NetworkFabricProperties` added property `fabric_locks` + - Model `NetworkFabricProperties` added property `hardware_alert_threshold` + - Model `NetworkFabricProperties` added property `control_plane_acls` + - Model `NetworkFabricProperties` added property `feature_flags` + - Model `NetworkFabricProperties` added property `trusted_ip_prefixes` + - Model `NetworkFabricProperties` added property `unique_rd_configuration` + - Model `NetworkFabricProperties` added property `storage_array_count` + - Model `NetworkFabricProperties` added property `active_commit_batches` + - Model `NetworkFabricProperties` added property `secret_rotation_summary` + - Model `NetworkFabricProperties` added property `last_operation` + - Model `NetworkFabricProperties` added property `authorized_transceiver` + - Model `NetworkFabricProperties` added property `qos_configuration` + - Model `NetworkInterface` added property `properties` + - Model `NetworkInterface` added property `identity` + - Model `NetworkInterfacePatchProperties` added property `additional_description` + - Model `NetworkInterfaceProperties` added property `description` + - Model `NetworkInterfaceProperties` added property `additional_description` + - Model `NetworkInterfaceProperties` added property `last_operation` + - Model `NetworkInterfaceProperties` added property `network_fabric_id` + - Model `NetworkInterfaceProperties` added property `configuration_state` + - Model `NetworkPacketBroker` added property `identity` + - Model `NetworkPacketBrokerPatch` added property `identity` + - Model `NetworkRack` added property `properties` + - Model `NetworkRackProperties` added property `last_operation` + - Model `NetworkRackProperties` added property `configuration_state` + - Model `NetworkTap` added property `properties` + - Model `NetworkTap` added property `identity` + - Model `NetworkTapPatch` added property `identity` + - Model `NetworkTapProperties` added property `network_fabric_ids` + - Model `NetworkTapProperties` added property `last_operation` + - Model `NetworkTapRule` added property `properties` + - Model `NetworkTapRule` added property `identity` + - Model `NetworkTapRulePatch` added property `properties` + - Model `NetworkTapRulePatch` added property `identity` + - Model `NetworkTapRulePatchProperties` added property `identity_selector` + - Model `NetworkTapRulePatchProperties` added property `global_network_tap_rule_actions` + - Model `NetworkTapRuleProperties` added property `identity_selector` + - Model `NetworkTapRuleProperties` added property `network_tap_ids` + - Model `NetworkTapRuleProperties` added property `global_network_tap_rule_actions` + - Model `NetworkTapRuleProperties` added property `last_operation` + - Model `NetworkTapRuleProperties` added property `network_fabric_ids` + - Model `OptionBLayer3Configuration` added property `pe_loopback_ip_address` + - Model `OptionBLayer3Configuration` added property `bmp_configuration` + - Model `OptionBLayer3Configuration` added property `prefix_limits` + - Enum `PortType` added member `BIDIRECTIONAL` + - Model `RoutePolicy` added property `properties` + - Model `RoutePolicyPatch` added property `properties` + - Model `RoutePolicyProperties` added property `last_operation` + - Model `RuleProperties` added property `condition` + - Model `RuleProperties` added property `destination_address_list` + - Model `RuleProperties` added property `source_address_list` + - Model `RuleProperties` added property `header_address_list` + - Enum `SourceDestinationType` added member `BIDIRECTIONAL` + - Model `StaticRouteConfiguration` added property `extension` + - Model `TerminalServerConfiguration` added property `secret_rotation_status` + - Added model `AccessControlListActionPatch` + - Added model `AccessControlListMatchConditionPatch` + - Added model `AccessControlListMatchConfigurationPatch` + - Added model `AccessControlListPortConditionPatch` + - Added enum `AclType` + - Added model `ActionIpCommunityPatchProperties` + - Added model `ActionIpExtendedCommunityPatchProperties` + - Added model `AggregateRoutePatchConfiguration` + - Added model `ArmConfigurationDiffOperationResponse` + - Added model `ArmConfigurationDiffResponseProperties` + - Added model `AuthorizedTransceiverPatchProperties` + - Added model `AuthorizedTransceiverProperties` + - Added model `BfdPatchConfiguration` + - Added enum `BgpAdministrativeState` + - Added model `BgpPatchConfiguration` + - Added model `BitRate` + - Added enum `BitRateUnit` + - Added model `BmpConfigurationPatchProperties` + - Added model `BmpConfigurationProperties` + - Added enum `BmpConfigurationState` + - Added enum `BmpExportPolicy` + - Added model `BmpExportPolicyPatchProperties` + - Added model `BmpExportPolicyProperties` + - Added enum `BmpMonitoredAddressFamily` + - Added model `BurstSize` + - Added enum `BurstSizeUnit` + - Added model `CertificateArchiveReference` + - Added model `CertificateRotationStatus` + - Added model `CommitBatchDetails` + - Added enum `CommitBatchState` + - Added model `CommitBatchStatusOperationResponse` + - Added model `CommitBatchStatusRequest` + - Added model `CommitBatchStatusResponseProperties` + - Added enum `CommitConfigurationPolicy` + - Added model `CommitConfigurationRequest` + - Added model `CommitConfigurationResponse` + - Added enum `CommitStage` + - Added model `CommonDynamicMatchConfigurationPatch` + - Added model `CommonErrorResponse` + - Added model `CommonMatchConditionsPatch` + - Added model `CommonPostActionResponseForDeviceROCommands` + - Added model `CommonPostActionResponseForDeviceROCommandsOperationStatusResult` + - Added model `ConditionalDefaultRouteProperties` + - Added model `ConnectedSubnetPatch` + - Added model `ConnectedSubnetRoutePolicyPatch` + - Added model `ControlPlanAclIpMatchCondition` + - Added model `ControlPlaneAclAction` + - Added model `ControlPlaneAclActionPatch` + - Added enum `ControlPlaneAclActionType` + - Added model `ControlPlaneAclIpMatchConditionPatch` + - Added model `ControlPlaneAclMatchCondition` + - Added model `ControlPlaneAclMatchConditionPatch` + - Added model `ControlPlaneAclMatchConfigurationPatchProperties` + - Added model `ControlPlaneAclMatchConfigurationProperties` + - Added model `ControlPlaneAclPatchProperties` + - Added model `ControlPlaneAclPortCondition` + - Added model `ControlPlaneAclPortMatchCondition` + - Added model `ControlPlaneAclPortMatchConditionPatch` + - Added enum `ControlPlaneAclPortMatchType` + - Added model `ControlPlaneAclProperties` + - Added model `ControlPlaneAclTtlMatchCondition` + - Added model `ControlPlaneAclTtlMatchConditionPatch` + - Added enum `ControlPlaneAclTtlMatchType` + - Added model `DestinationPatchProperties` + - Added model `DeviceRoCommand` + - Added enum `DeviceRole` + - Added model `DeviceRwCommand` + - Added model `DiscardCommitBatchOperationResponse` + - Added model `DiscardCommitBatchRequest` + - Added model `DiscardCommitBatchResponseProperties` + - Added model `ExportRoutePolicyInformationPatch` + - Added model `ExportRoutePolicyPatch` + - Added enum `ExtendedVlan` + - Added model `ExternalNetworkBmpPatchProperties` + - Added model `ExternalNetworkBmpProperties` + - Added enum `ExternalNetworkRouteType` + - Added model `ExternalNetworkStaticRouteConfiguration` + - Added model `ExternalNetworkStaticRoutePatchConfiguration` + - Added model `ExternalNetworkUpdateBfdAdministrativeStateRequest` + - Added model `ExternalNetworkUpdateBfdAdministrativeStateResponse` + - Added model `ExternalNetworkUpdateBfdAdministrativeStateResponseProperties` + - Added model `FabricLockProperties` + - Added model `FeatureFlagProperties` + - Added model `GetTopologyResponse` + - Added model `GetTopologyResponseProperties` + - Added model `GlobalAccessControlListActionPatchProperties` + - Added model `GlobalAccessControlListActionProperties` + - Added model `GlobalNetworkTapRuleActionPatchProperties` + - Added model `GlobalNetworkTapRuleActionProperties` + - Added model `HeaderAddressProperties` + - Added model `IcmpConfigurationPatchProperties` + - Added model `IcmpConfigurationProperties` + - Added model `IdentitySelector` + - Added model `IdentitySelectorPatch` + - Added model `ImportRoutePolicyInformationPatch` + - Added model `ImportRoutePolicyPatch` + - Added model `InternalNetworkBmpPatchProperties` + - Added model `InternalNetworkBmpProperties` + - Added enum `InternalNetworkRouteType` + - Added model `InternalNetworkUpdateBfdAdministrativeStateRequest` + - Added model `InternalNetworkUpdateBfdAdministrativeStateResponse` + - Added model `InternalNetworkUpdateBfdAdministrativeStateResponseProperties` + - Added model `InternalNetworkUpdateBgpAdministrativeStateRequest` + - Added model `InternalNetworkUpdateBgpAdministrativeStateResponse` + - Added model `InternalNetworkUpdateBgpAdministrativeStateResponseProperties` + - Added model `IpGroupPatchProperties` + - Added model `IpMatchConditionPatch` + - Added model `IsolationDomainPatchProperties` + - Added model `L3ExportRoutePolicyPatch` + - Added model `L3OptionBPatchProperties` + - Added model `L3UniqueRouteDistinguisherProperties` + - Added model `LastOperationProperties` + - Added model `Layer2ConfigurationPatch` + - Added model `Layer3IpPrefixPatchProperties` + - Added enum `LockConfigurationState` + - Added model `ManagedServiceIdentity` + - Added model `ManagedServiceIdentityPatch` + - Added enum `ManagedServiceIdentitySelectorType` + - Added enum `ManagedServiceIdentityType` + - Added model `ManagementNetworkPatchConfiguration` + - Added enum `MicroBfdState` + - Added enum `NNIDerivedUniqueRouteDistinguisherConfigurationState` + - Added model `NativeIpv4PrefixLimitPatchProperties` + - Added model `NativeIpv4PrefixLimitProperties` + - Added model `NativeIpv6PrefixLimitPatchProperties` + - Added model `NativeIpv6PrefixLimitProperties` + - Added model `NeighborAddressBfdAdministrativeStatus` + - Added model `NeighborAddressBgpAdministrativeStatus` + - Added model `NeighborAddressPatch` + - Added model `NeighborGroupDestinationPatch` + - Added model `NeighborGroupResyncResponse` + - Added model `NetworkBootstrapDevice` + - Added model `NetworkBootstrapDevicePatch` + - Added model `NetworkBootstrapDevicePatchProperties` + - Added model `NetworkBootstrapDeviceProperties` + - Added model `NetworkBootstrapDeviceRebootResponse` + - Added model `NetworkBootstrapDeviceRefreshConfigurationResponse` + - Added model `NetworkBootstrapDeviceResyncPasswordsResponse` + - Added model `NetworkBootstrapDeviceUpdateAdministrativeStateResponse` + - Added model `NetworkBootstrapDeviceUpgradeResponse` + - Added model `NetworkBootstrapInterface` + - Added model `NetworkBootstrapInterfacePatch` + - Added model `NetworkBootstrapInterfacePatchProperties` + - Added model `NetworkBootstrapInterfaceProperties` + - Added model `NetworkDeviceRefreshConfigurationResponse` + - Added model `NetworkDeviceResyncPasswordsResponse` + - Added model `NetworkDeviceRunRwCommandResponse` + - Added model `NetworkDeviceRwCommandResponseProperties` + - Added model `NetworkDeviceUpdateAdministrativeStateResponse` + - Added model `NetworkDeviceUpgradeRequest` + - Added model `NetworkDeviceUpgradeResponse` + - Added enum `NetworkFabricLockAction` + - Added model `NetworkFabricLockRequest` + - Added enum `NetworkFabricLockType` + - Added model `NetworkFabricResyncCertificatesResponse` + - Added model `NetworkFabricResyncPasswordsResponse` + - Added model `NetworkFabricRotateCertificatesResponse` + - Added model `NetworkFabricRotatePasswordsResponse` + - Added model `NetworkMonitor` + - Added model `NetworkMonitorPatch` + - Added model `NetworkMonitorPatchProperties` + - Added model `NetworkMonitorProperties` + - Added model `NetworkRackPatch` + - Added model `NetworkTapResyncResponse` + - Added model `NetworkTapRuleActionPatch` + - Added model `NetworkTapRuleMatchConditionPatch` + - Added model `NetworkTapRuleMatchConfigurationPatch` + - Added model `NetworkTapRuleResyncResponse` + - Added model `NniBmpPatchProperties` + - Added model `NniBmpProperties` + - Added model `NniStaticRouteConfiguration` + - Added model `NniStaticRoutePatchConfiguration` + - Added model `NniUpdateBfdAdministrativeStateRequest` + - Added model `NniUpdateBfdAdministrativeStateResponse` + - Added model `NniUpdateBfdAdministrativeStateResponseProperties` + - Added model `NpbStaticRouteConfigurationPatch` + - Added model `OperationStatusResult` + - Added model `OptionBLayer3ConfigurationPatchProperties` + - Added model `OptionBLayer3PrefixLimitPatchProperties` + - Added model `OptionBLayer3PrefixLimitProperties` + - Added model `PoliceRateConfigurationProperties` + - Added model `PortConditionPatch` + - Added model `PortGroupPatchProperties` + - Added model `PrefixLimitPatchProperties` + - Added model `PrefixLimitProperties` + - Added model `ProxyResourceBase` + - Added enum `QosConfigurationState` + - Added model `QosPatchProperties` + - Added model `QosProperties` + - Added model `RoutePolicyStatementPatchProperties` + - Added model `RoutePrefixLimitPatchProperties` + - Added model `RoutePrefixLimitProperties` + - Added model `RouteTargetPatchInformation` + - Added enum `RouteType` + - Added enum `RuleCondition` + - Added model `SecretArchiveReference` + - Added model `SecretRotationStatus` + - Added model `SecretRotationSummary` + - Added model `StatementActionPatchProperties` + - Added model `StatementConditionPatchProperties` + - Added model `StaticRoutePatchConfiguration` + - Added model `StaticRoutePatchProperties` + - Added model `StaticRoutePolicy` + - Added model `StaticRoutePolicyPatch` + - Added enum `StationConfigurationState` + - Added enum `StationConnectionMode` + - Added model `StationConnectionPatchProperties` + - Added model `StationConnectionProperties` + - Added model `StorageAccountConfiguration` + - Added model `StorageAccountPatchConfiguration` + - Added enum `SynchronizationStatus` + - Added model `TerminalServerPatchConfiguration` + - Added enum `UniqueRouteDistinguisherConfigurationState` + - Added model `UniqueRouteDistinguisherPatchProperties` + - Added model `UniqueRouteDistinguisherProperties` + - Added model `UpdateAdministrativeStateResponse` + - Added model `UpdateAdministrativeStateResponseProperties` + - Added model `UserAssignedIdentity` + - Added enum `V4OverV6BgpSessionState` + - Added enum `V6OverV4BgpSessionState` + - Added model `ViewDeviceConfigurationOperationResponse` + - Added model `ViewDeviceConfigurationResponseProperties` + - Added model `VlanGroupPatchProperties` + - Added model `VlanMatchConditionPatch` + - Added model `VpnOptionAPatchProperties` + - Added model `VpnOptionAProperties` + - Added model `VpnOptionBPatchProperties` + - Added model `VpnOptionBProperties` + - Model `ExternalNetworksOperations` added method `begin_update_bfd_administrative_state` + - Model `InternalNetworksOperations` added method `begin_update_bfd_administrative_state` + - Model `NeighborGroupsOperations` added method `begin_resync` + - Model `NetworkDevicesOperations` added method `begin_resync_certificates` + - Model `NetworkDevicesOperations` added method `begin_resync_passwords` + - Model `NetworkDevicesOperations` added method `begin_run_ro_command` + - Model `NetworkDevicesOperations` added method `begin_run_rw_command` + - Model `NetworkFabricsOperations` added method `begin_arm_configuration_diff` + - Model `NetworkFabricsOperations` added method `begin_commit_batch_status` + - Model `NetworkFabricsOperations` added method `begin_discard_commit_batch` + - Model `NetworkFabricsOperations` added method `begin_lock_fabric` + - Model `NetworkFabricsOperations` added method `begin_resync_certificates` + - Model `NetworkFabricsOperations` added method `begin_resync_passwords` + - Model `NetworkFabricsOperations` added method `begin_rotate_certificates` + - Model `NetworkFabricsOperations` added method `begin_rotate_passwords` + - Model `NetworkFabricsOperations` added method `begin_view_device_configuration` + - Model `NetworkToNetworkInterconnectsOperations` added method `begin_update_bfd_administrative_state` + - Added model `NetworkBootstrapDevicesOperations` + - Added model `NetworkBootstrapInterfacesOperations` + - Added model `NetworkMonitorsOperations` + +### Breaking Changes + + - Model `AccessControlList` deleted or renamed its instance variable `annotation` + - Model `AccessControlList` deleted or renamed its instance variable `configuration_type` + - Model `AccessControlList` deleted or renamed its instance variable `acls_url` + - Model `AccessControlList` deleted or renamed its instance variable `default_action` + - Model `AccessControlList` deleted or renamed its instance variable `match_configurations` + - Model `AccessControlList` deleted or renamed its instance variable `dynamic_match_configurations` + - Model `AccessControlList` deleted or renamed its instance variable `last_synced_time` + - Model `AccessControlList` deleted or renamed its instance variable `configuration_state` + - Model `AccessControlList` deleted or renamed its instance variable `provisioning_state` + - Model `AccessControlList` deleted or renamed its instance variable `administrative_state` + - Model `AccessControlListPatch` deleted or renamed its instance variable `configuration_type` + - Model `AccessControlListPatch` deleted or renamed its instance variable `acls_url` + - Model `AccessControlListPatch` deleted or renamed its instance variable `default_action` + - Model `AccessControlListPatch` deleted or renamed its instance variable `match_configurations` + - Model `AccessControlListPatch` deleted or renamed its instance variable `dynamic_match_configurations` + - Model `AccessControlListPatch` deleted or renamed its instance variable `annotation` + - Model `ConnectedSubnetRoutePolicy` deleted or renamed its instance variable `export_route_policy_id` + - Model `ExternalNetwork` deleted or renamed its instance variable `annotation` + - Model `ExternalNetwork` deleted or renamed its instance variable `network_to_network_interconnect_id` + - Model `ExternalNetwork` deleted or renamed its instance variable `import_route_policy_id` + - Model `ExternalNetwork` deleted or renamed its instance variable `export_route_policy_id` + - Model `ExternalNetwork` deleted or renamed its instance variable `import_route_policy` + - Model `ExternalNetwork` deleted or renamed its instance variable `export_route_policy` + - Model `ExternalNetwork` deleted or renamed its instance variable `peering_option` + - Model `ExternalNetwork` deleted or renamed its instance variable `option_b_properties` + - Model `ExternalNetwork` deleted or renamed its instance variable `option_a_properties` + - Model `ExternalNetwork` deleted or renamed its instance variable `configuration_state` + - Model `ExternalNetwork` deleted or renamed its instance variable `provisioning_state` + - Model `ExternalNetwork` deleted or renamed its instance variable `administrative_state` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `annotation` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `network_to_network_interconnect_id` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `import_route_policy_id` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `export_route_policy_id` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `import_route_policy` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `export_route_policy` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `peering_option` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `option_b_properties` + - Model `ExternalNetworkPatch` deleted or renamed its instance variable `option_a_properties` + - Model `ExternalNetworkPatchProperties` deleted or renamed its instance variable `import_route_policy_id` + - Model `ExternalNetworkPatchProperties` deleted or renamed its instance variable `export_route_policy_id` + - Model `ExternalNetworkProperties` deleted or renamed its instance variable `import_route_policy_id` + - Model `ExternalNetworkProperties` deleted or renamed its instance variable `export_route_policy_id` + - Model `InternalNetwork` deleted or renamed its instance variable `annotation` + - Model `InternalNetwork` deleted or renamed its instance variable `mtu` + - Model `InternalNetwork` deleted or renamed its instance variable `connected_i_pv4_subnets` + - Model `InternalNetwork` deleted or renamed its instance variable `connected_i_pv6_subnets` + - Model `InternalNetwork` deleted or renamed its instance variable `import_route_policy_id` + - Model `InternalNetwork` deleted or renamed its instance variable `export_route_policy_id` + - Model `InternalNetwork` deleted or renamed its instance variable `import_route_policy` + - Model `InternalNetwork` deleted or renamed its instance variable `export_route_policy` + - Model `InternalNetwork` deleted or renamed its instance variable `ingress_acl_id` + - Model `InternalNetwork` deleted or renamed its instance variable `egress_acl_id` + - Model `InternalNetwork` deleted or renamed its instance variable `is_monitoring_enabled` + - Model `InternalNetwork` deleted or renamed its instance variable `extension` + - Model `InternalNetwork` deleted or renamed its instance variable `vlan_id` + - Model `InternalNetwork` deleted or renamed its instance variable `bgp_configuration` + - Model `InternalNetwork` deleted or renamed its instance variable `static_route_configuration` + - Model `InternalNetwork` deleted or renamed its instance variable `configuration_state` + - Model `InternalNetwork` deleted or renamed its instance variable `provisioning_state` + - Model `InternalNetwork` deleted or renamed its instance variable `administrative_state` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `annotation` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `mtu` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `connected_i_pv4_subnets` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `connected_i_pv6_subnets` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `import_route_policy_id` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `export_route_policy_id` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `import_route_policy` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `export_route_policy` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `ingress_acl_id` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `egress_acl_id` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `is_monitoring_enabled` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `bgp_configuration` + - Model `InternalNetworkPatch` deleted or renamed its instance variable `static_route_configuration` + - Model `InternalNetworkPatchProperties` deleted or renamed its instance variable `import_route_policy_id` + - Model `InternalNetworkPatchProperties` deleted or renamed its instance variable `export_route_policy_id` + - Model `InternalNetworkProperties` deleted or renamed its instance variable `import_route_policy_id` + - Model `InternalNetworkProperties` deleted or renamed its instance variable `export_route_policy_id` + - Model `InternetGateway` deleted or renamed its instance variable `annotation` + - Model `InternetGateway` deleted or renamed its instance variable `internet_gateway_rule_id` + - Model `InternetGateway` deleted or renamed its instance variable `ipv4_address` + - Model `InternetGateway` deleted or renamed its instance variable `port` + - Model `InternetGateway` deleted or renamed its instance variable `type_properties_type` + - Model `InternetGateway` deleted or renamed its instance variable `network_fabric_controller_id` + - Model `InternetGateway` deleted or renamed its instance variable `provisioning_state` + - Model `InternetGatewayRule` deleted or renamed its instance variable `annotation` + - Model `InternetGatewayRule` deleted or renamed its instance variable `rule_properties` + - Model `InternetGatewayRule` deleted or renamed its instance variable `provisioning_state` + - Model `InternetGatewayRule` deleted or renamed its instance variable `internet_gateway_ids` + - Model `IpCommunity` deleted or renamed its instance variable `annotation` + - Model `IpCommunity` deleted or renamed its instance variable `ip_community_rules` + - Model `IpCommunity` deleted or renamed its instance variable `configuration_state` + - Model `IpCommunity` deleted or renamed its instance variable `provisioning_state` + - Model `IpCommunity` deleted or renamed its instance variable `administrative_state` + - Model `IpCommunityPatch` deleted or renamed its instance variable `ip_community_rules` + - Model `IpExtendedCommunity` deleted or renamed its instance variable `annotation` + - Model `IpExtendedCommunity` deleted or renamed its instance variable `ip_extended_community_rules` + - Model `IpExtendedCommunity` deleted or renamed its instance variable `configuration_state` + - Model `IpExtendedCommunity` deleted or renamed its instance variable `provisioning_state` + - Model `IpExtendedCommunity` deleted or renamed its instance variable `administrative_state` + - Model `IpExtendedCommunityPatch` deleted or renamed its instance variable `ip_extended_community_rules` + - Model `IpExtendedCommunityPatch` deleted or renamed its instance variable `annotation` + - Model `IpPrefix` deleted or renamed its instance variable `annotation` + - Model `IpPrefix` deleted or renamed its instance variable `ip_prefix_rules` + - Model `IpPrefix` deleted or renamed its instance variable `configuration_state` + - Model `IpPrefix` deleted or renamed its instance variable `provisioning_state` + - Model `IpPrefix` deleted or renamed its instance variable `administrative_state` + - Model `IpPrefixPatch` deleted or renamed its instance variable `annotation` + - Model `IpPrefixPatch` deleted or renamed its instance variable `ip_prefix_rules` + - Model `L2IsolationDomain` deleted or renamed its instance variable `annotation` + - Model `L2IsolationDomain` deleted or renamed its instance variable `network_fabric_id` + - Model `L2IsolationDomain` deleted or renamed its instance variable `vlan_id` + - Model `L2IsolationDomain` deleted or renamed its instance variable `mtu` + - Model `L2IsolationDomain` deleted or renamed its instance variable `configuration_state` + - Model `L2IsolationDomain` deleted or renamed its instance variable `provisioning_state` + - Model `L2IsolationDomain` deleted or renamed its instance variable `administrative_state` + - Model `L2IsolationDomainPatch` deleted or renamed its instance variable `annotation` + - Model `L2IsolationDomainPatch` deleted or renamed its instance variable `mtu` + - Model `L3IsolationDomain` deleted or renamed its instance variable `annotation` + - Model `L3IsolationDomain` deleted or renamed its instance variable `redistribute_connected_subnets` + - Model `L3IsolationDomain` deleted or renamed its instance variable `redistribute_static_routes` + - Model `L3IsolationDomain` deleted or renamed its instance variable `aggregate_route_configuration` + - Model `L3IsolationDomain` deleted or renamed its instance variable `connected_subnet_route_policy` + - Model `L3IsolationDomain` deleted or renamed its instance variable `network_fabric_id` + - Model `L3IsolationDomain` deleted or renamed its instance variable `configuration_state` + - Model `L3IsolationDomain` deleted or renamed its instance variable `provisioning_state` + - Model `L3IsolationDomain` deleted or renamed its instance variable `administrative_state` + - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `annotation` + - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `redistribute_connected_subnets` + - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `redistribute_static_routes` + - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `aggregate_route_configuration` + - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `connected_subnet_route_policy` + - Model `NeighborGroup` deleted or renamed its instance variable `annotation` + - Model `NeighborGroup` deleted or renamed its instance variable `destination` + - Model `NeighborGroup` deleted or renamed its instance variable `network_tap_ids` + - Model `NeighborGroup` deleted or renamed its instance variable `network_tap_rule_ids` + - Model `NeighborGroup` deleted or renamed its instance variable `provisioning_state` + - Model `NeighborGroupPatch` deleted or renamed its instance variable `annotation` + - Model `NeighborGroupPatch` deleted or renamed its instance variable `destination` + - Model `NetworkDevice` deleted or renamed its instance variable `annotation` + - Model `NetworkDevice` deleted or renamed its instance variable `host_name` + - Model `NetworkDevice` deleted or renamed its instance variable `serial_number` + - Model `NetworkDevice` deleted or renamed its instance variable `version` + - Model `NetworkDevice` deleted or renamed its instance variable `network_device_sku` + - Model `NetworkDevice` deleted or renamed its instance variable `network_device_role` + - Model `NetworkDevice` deleted or renamed its instance variable `network_rack_id` + - Model `NetworkDevice` deleted or renamed its instance variable `management_ipv4_address` + - Model `NetworkDevice` deleted or renamed its instance variable `management_ipv6_address` + - Model `NetworkDevice` deleted or renamed its instance variable `configuration_state` + - Model `NetworkDevice` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkDevice` deleted or renamed its instance variable `administrative_state` + - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `annotation` + - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `host_name` + - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `serial_number` + - Model `NetworkFabric` deleted or renamed its instance variable `annotation` + - Model `NetworkFabric` deleted or renamed its instance variable `network_fabric_sku` + - Model `NetworkFabric` deleted or renamed its instance variable `fabric_version` + - Model `NetworkFabric` deleted or renamed its instance variable `router_ids` + - Model `NetworkFabric` deleted or renamed its instance variable `network_fabric_controller_id` + - Model `NetworkFabric` deleted or renamed its instance variable `rack_count` + - Model `NetworkFabric` deleted or renamed its instance variable `server_count_per_rack` + - Model `NetworkFabric` deleted or renamed its instance variable `ipv4_prefix` + - Model `NetworkFabric` deleted or renamed its instance variable `ipv6_prefix` + - Model `NetworkFabric` deleted or renamed its instance variable `fabric_asn` + - Model `NetworkFabric` deleted or renamed its instance variable `terminal_server_configuration` + - Model `NetworkFabric` deleted or renamed its instance variable `management_network_configuration` + - Model `NetworkFabric` deleted or renamed its instance variable `racks` + - Model `NetworkFabric` deleted or renamed its instance variable `l2_isolation_domains` + - Model `NetworkFabric` deleted or renamed its instance variable `l3_isolation_domains` + - Model `NetworkFabric` deleted or renamed its instance variable `configuration_state` + - Model `NetworkFabric` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkFabric` deleted or renamed its instance variable `administrative_state` + - Model `NetworkFabricController` deleted or renamed its instance variable `annotation` + - Model `NetworkFabricController` deleted or renamed its instance variable `infrastructure_express_route_connections` + - Model `NetworkFabricController` deleted or renamed its instance variable `workload_express_route_connections` + - Model `NetworkFabricController` deleted or renamed its instance variable `infrastructure_services` + - Model `NetworkFabricController` deleted or renamed its instance variable `workload_services` + - Model `NetworkFabricController` deleted or renamed its instance variable `managed_resource_group_configuration` + - Model `NetworkFabricController` deleted or renamed its instance variable `network_fabric_ids` + - Model `NetworkFabricController` deleted or renamed its instance variable `workload_management_network` + - Model `NetworkFabricController` deleted or renamed its instance variable `is_workload_management_network_enabled` + - Model `NetworkFabricController` deleted or renamed its instance variable `tenant_internet_gateway_ids` + - Model `NetworkFabricController` deleted or renamed its instance variable `ipv4_address_space` + - Model `NetworkFabricController` deleted or renamed its instance variable `ipv6_address_space` + - Model `NetworkFabricController` deleted or renamed its instance variable `nfc_sku` + - Model `NetworkFabricController` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkFabricControllerProperties` deleted or renamed its instance variable `workload_management_network` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `annotation` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `rack_count` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `server_count_per_rack` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `ipv4_prefix` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `ipv6_prefix` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `fabric_asn` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `terminal_server_configuration` + - Model `NetworkFabricPatch` deleted or renamed its instance variable `management_network_configuration` + - Model `NetworkInterface` deleted or renamed its instance variable `annotation` + - Model `NetworkInterface` deleted or renamed its instance variable `physical_identifier` + - Model `NetworkInterface` deleted or renamed its instance variable `connected_to` + - Model `NetworkInterface` deleted or renamed its instance variable `interface_type` + - Model `NetworkInterface` deleted or renamed its instance variable `ipv4_address` + - Model `NetworkInterface` deleted or renamed its instance variable `ipv6_address` + - Model `NetworkInterface` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkInterface` deleted or renamed its instance variable `administrative_state` + - Model `NetworkInterfacePatch` deleted or renamed its instance variable `annotation` + - Model `NetworkRack` deleted or renamed its instance variable `annotation` + - Model `NetworkRack` deleted or renamed its instance variable `network_rack_type` + - Model `NetworkRack` deleted or renamed its instance variable `network_fabric_id` + - Model `NetworkRack` deleted or renamed its instance variable `network_devices` + - Model `NetworkRack` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkTap` deleted or renamed its instance variable `annotation` + - Model `NetworkTap` deleted or renamed its instance variable `network_packet_broker_id` + - Model `NetworkTap` deleted or renamed its instance variable `source_tap_rule_id` + - Model `NetworkTap` deleted or renamed its instance variable `destinations` + - Model `NetworkTap` deleted or renamed its instance variable `polling_type` + - Model `NetworkTap` deleted or renamed its instance variable `configuration_state` + - Model `NetworkTap` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkTap` deleted or renamed its instance variable `administrative_state` + - Model `NetworkTapRule` deleted or renamed its instance variable `annotation` + - Model `NetworkTapRule` deleted or renamed its instance variable `configuration_type` + - Model `NetworkTapRule` deleted or renamed its instance variable `tap_rules_url` + - Model `NetworkTapRule` deleted or renamed its instance variable `match_configurations` + - Model `NetworkTapRule` deleted or renamed its instance variable `dynamic_match_configurations` + - Model `NetworkTapRule` deleted or renamed its instance variable `network_tap_id` + - Model `NetworkTapRule` deleted or renamed its instance variable `polling_interval_in_seconds` + - Model `NetworkTapRule` deleted or renamed its instance variable `last_synced_time` + - Model `NetworkTapRule` deleted or renamed its instance variable `configuration_state` + - Model `NetworkTapRule` deleted or renamed its instance variable `provisioning_state` + - Model `NetworkTapRule` deleted or renamed its instance variable `administrative_state` + - Model `NetworkTapRulePatch` deleted or renamed its instance variable `annotation` + - Model `NetworkTapRulePatch` deleted or renamed its instance variable `configuration_type` + - Model `NetworkTapRulePatch` deleted or renamed its instance variable `tap_rules_url` + - Model `NetworkTapRulePatch` deleted or renamed its instance variable `match_configurations` + - Model `NetworkTapRulePatch` deleted or renamed its instance variable `dynamic_match_configurations` + - Model `RoutePolicy` deleted or renamed its instance variable `annotation` + - Model `RoutePolicy` deleted or renamed its instance variable `default_action` + - Model `RoutePolicy` deleted or renamed its instance variable `statements` + - Model `RoutePolicy` deleted or renamed its instance variable `network_fabric_id` + - Model `RoutePolicy` deleted or renamed its instance variable `address_family_type` + - Model `RoutePolicy` deleted or renamed its instance variable `configuration_state` + - Model `RoutePolicy` deleted or renamed its instance variable `provisioning_state` + - Model `RoutePolicy` deleted or renamed its instance variable `administrative_state` + - Model `RoutePolicyPatch` deleted or renamed its instance variable `default_action` + - Model `RoutePolicyPatch` deleted or renamed its instance variable `statements` + - Deleted or renamed model `AccessControlListPatchableProperties` + - Deleted or renamed model `ExtendedLocation` + - Deleted or renamed model `ExtensionEnumProperty` + - Deleted or renamed model `ExternalNetworkPatchableProperties` + - Deleted or renamed model `ExternalNetworksList` + - Deleted or renamed model `InternalNetworkPatchableProperties` + - Deleted or renamed model `InternalNetworkPropertiesBgpConfiguration` + - Deleted or renamed model `InternalNetworkPropertiesStaticRouteConfiguration` + - Deleted or renamed model `InternalNetworksList` + - Deleted or renamed model `InternetGatewayPatchableProperties` + - Deleted or renamed model `IpCommunityAddOperationProperties` + - Deleted or renamed model `IpCommunityDeleteOperationProperties` + - Deleted or renamed model `IpCommunitySetOperationProperties` + - Deleted or renamed model `IpExtendedCommunityAddOperationProperties` + - Deleted or renamed model `IpExtendedCommunityDeleteOperationProperties` + - Deleted or renamed model `IpExtendedCommunityPatchableProperties` + - Deleted or renamed model `IpExtendedCommunitySetOperationProperties` + - Deleted or renamed model `IpPrefixPatchableProperties` + - Deleted or renamed model `L3IsolationDomainPatchableProperties` + - Deleted or renamed model `L3OptionAProperties` + - Deleted or renamed model `ManagementNetworkConfigurationPatchableProperties` + - Deleted or renamed model `NeighborGroupPatchableProperties` + - Deleted or renamed model `NetworkDevicePatchableProperties` + - Deleted or renamed model `NetworkFabricControllerPatchableProperties` + - Deleted or renamed model `NetworkFabricPatchableProperties` + - Deleted or renamed model `NetworkFabricPatchablePropertiesTerminalServerConfiguration` + - Deleted or renamed model `NetworkInterfacesList` + - Deleted or renamed model `NetworkTapPatchableParameters` + - Deleted or renamed model `NetworkTapPatchableParametersDestinationsItem` + - Deleted or renamed model `NetworkTapPropertiesDestinationsItem` + - Deleted or renamed model `NetworkTapRulePatchableProperties` + - Deleted or renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` + - Deleted or renamed model `NetworkToNetworkInterconnectsList` + - Deleted or renamed model `OptionAProperties` + - Deleted or renamed model `OptionBProperties` + - Deleted or renamed model `PollingIntervalInSeconds` + - Deleted or renamed model `TerminalServerPatchableProperties` + - Deleted or renamed model `VpnConfigurationPatchablePropertiesOptionAProperties` + - Deleted or renamed model `VpnConfigurationPropertiesOptionAProperties` + - Method `AccessControlListsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `ExternalNetworksOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_bgp_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `L2IsolationDomainsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `L3IsolationDomainsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkDevicesOperations.begin_reboot` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` + - Method `NetworkDevicesOperations.begin_refresh_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceRefreshConfigurationResponse]` + - Method `NetworkDevicesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]` + - Method `NetworkDevicesOperations.begin_upgrade` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceUpgradeResponse]` + - Method `NetworkFabricsOperations.begin_commit_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[CommitConfigurationResponse]` + - Method `NetworkFabricsOperations.begin_deprovision` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_get_topology` changed return type from `AsyncLROPoller[ValidateConfigurationResponse]` to `AsyncLROPoller[GetTopologyResponse]` + - Method `NetworkFabricsOperations.begin_provision` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_refresh_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_update_infra_management_bfd_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkFabricsOperations.begin_update_workload_management_bfd_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkFabricsOperations.begin_upgrade` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` + - Method `NetworkInterfacesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkTapRulesOperations.begin_resync` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkTapRuleResyncResponse]` + - Method `NetworkTapsOperations.begin_resync` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkTapResyncResponse]` + - Method `NetworkTapsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkToNetworkInterconnectsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `RoutePoliciesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` + - Method `AccessControlListsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `ExternalNetworksOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_bgp_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]` + - Method `InternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `L2IsolationDomainsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `L3IsolationDomainsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkDevicesOperations.begin_reboot` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[OperationStatusResult]` + - Method `NetworkDevicesOperations.begin_refresh_configuration` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[NetworkDeviceRefreshConfigurationResponse]` + - Method `NetworkDevicesOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[NetworkDeviceUpdateAdministrativeStateResponse]` + - Method `NetworkDevicesOperations.begin_upgrade` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[NetworkDeviceUpgradeResponse]` + - Method `NetworkFabricsOperations.begin_commit_configuration` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[CommitConfigurationResponse]` + - Method `NetworkFabricsOperations.begin_deprovision` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_get_topology` changed return type from `LROPoller[ValidateConfigurationResponse]` to `LROPoller[GetTopologyResponse]` + - Method `NetworkFabricsOperations.begin_provision` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_refresh_configuration` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[OperationStatusResult]` + - Method `NetworkFabricsOperations.begin_update_infra_management_bfd_configuration` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkFabricsOperations.begin_update_workload_management_bfd_configuration` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkFabricsOperations.begin_upgrade` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[OperationStatusResult]` + - Method `NetworkInterfacesOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkTapRulesOperations.begin_resync` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[NetworkTapRuleResyncResponse]` + - Method `NetworkTapsOperations.begin_resync` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[NetworkTapResyncResponse]` + - Method `NetworkTapsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkToNetworkInterconnectsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` + - Method `RoutePoliciesOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` ## 1.0.0 (2023-07-19) From bb48bcb380c2464c93cd619458f0d0043190f4c0 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 12:38:20 +0800 Subject: [PATCH 4/6] Consolidate renames in CHANGELOG for azure-mgmt-managednetworkfabric --- .../azure-mgmt-managednetworkfabric/CHANGELOG.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md index b4c5fae517fa..d4ad7796fef5 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md @@ -312,7 +312,6 @@ - Added model `ManagedServiceIdentityPatch` - Added enum `ManagedServiceIdentitySelectorType` - Added enum `ManagedServiceIdentityType` - - Added model `ManagementNetworkPatchConfiguration` - Added enum `MicroBfdState` - Added enum `NNIDerivedUniqueRouteDistinguisherConfigurationState` - Added model `NativeIpv4PrefixLimitPatchProperties` @@ -370,7 +369,6 @@ - Added model `NniUpdateBfdAdministrativeStateResponseProperties` - Added model `NpbStaticRouteConfigurationPatch` - Added model `OperationStatusResult` - - Added model `OptionBLayer3ConfigurationPatchProperties` - Added model `OptionBLayer3PrefixLimitPatchProperties` - Added model `OptionBLayer3PrefixLimitProperties` - Added model `PoliceRateConfigurationProperties` @@ -404,7 +402,6 @@ - Added model `StorageAccountConfiguration` - Added model `StorageAccountPatchConfiguration` - Added enum `SynchronizationStatus` - - Added model `TerminalServerPatchConfiguration` - Added enum `UniqueRouteDistinguisherConfigurationState` - Added model `UniqueRouteDistinguisherPatchProperties` - Added model `UniqueRouteDistinguisherProperties` @@ -420,7 +417,6 @@ - Added model `VpnOptionAPatchProperties` - Added model `VpnOptionAProperties` - Added model `VpnOptionBPatchProperties` - - Added model `VpnOptionBProperties` - Model `ExternalNetworksOperations` added method `begin_update_bfd_administrative_state` - Model `InternalNetworksOperations` added method `begin_update_bfd_administrative_state` - Model `NeighborGroupsOperations` added method `begin_resync` @@ -706,21 +702,21 @@ - Deleted or renamed model `IpPrefixPatchableProperties` - Deleted or renamed model `L3IsolationDomainPatchableProperties` - Deleted or renamed model `L3OptionAProperties` - - Deleted or renamed model `ManagementNetworkConfigurationPatchableProperties` + - Renamed model `ManagementNetworkConfigurationPatchableProperties` to `ManagementNetworkPatchConfiguration` - Deleted or renamed model `NeighborGroupPatchableProperties` - Deleted or renamed model `NetworkDevicePatchableProperties` - Deleted or renamed model `NetworkFabricControllerPatchableProperties` - Deleted or renamed model `NetworkFabricPatchableProperties` - - Deleted or renamed model `NetworkFabricPatchablePropertiesTerminalServerConfiguration` + - Renamed model `NetworkFabricPatchablePropertiesTerminalServerConfiguration` to `TerminalServerPatchConfiguration` - Deleted or renamed model `NetworkInterfacesList` - Deleted or renamed model `NetworkTapPatchableParameters` - Deleted or renamed model `NetworkTapPatchableParametersDestinationsItem` - Deleted or renamed model `NetworkTapPropertiesDestinationsItem` - Deleted or renamed model `NetworkTapRulePatchableProperties` - - Deleted or renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` + - Renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` to `OptionBLayer3ConfigurationPatchProperties` - Deleted or renamed model `NetworkToNetworkInterconnectsList` - Deleted or renamed model `OptionAProperties` - - Deleted or renamed model `OptionBProperties` + - Renamed model `OptionBProperties` to `VpnOptionBProperties` - Deleted or renamed model `PollingIntervalInSeconds` - Deleted or renamed model `TerminalServerPatchableProperties` - Deleted or renamed model `VpnConfigurationPatchablePropertiesOptionAProperties` From c16c22e86db232effa201991d232592b8dd2168e Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 12:47:44 +0800 Subject: [PATCH 5/6] Correct rename consolidation in CHANGELOG for azure-mgmt-managednetworkfabric --- .../azure-mgmt-managednetworkfabric/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md index d4ad7796fef5..e5dc96b6da7b 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md @@ -369,6 +369,7 @@ - Added model `NniUpdateBfdAdministrativeStateResponseProperties` - Added model `NpbStaticRouteConfigurationPatch` - Added model `OperationStatusResult` + - Added model `OptionBLayer3ConfigurationPatchProperties` - Added model `OptionBLayer3PrefixLimitPatchProperties` - Added model `OptionBLayer3PrefixLimitProperties` - Added model `PoliceRateConfigurationProperties` @@ -415,7 +416,6 @@ - Added model `VlanGroupPatchProperties` - Added model `VlanMatchConditionPatch` - Added model `VpnOptionAPatchProperties` - - Added model `VpnOptionAProperties` - Added model `VpnOptionBPatchProperties` - Model `ExternalNetworksOperations` added method `begin_update_bfd_administrative_state` - Model `InternalNetworksOperations` added method `begin_update_bfd_administrative_state` @@ -713,9 +713,9 @@ - Deleted or renamed model `NetworkTapPatchableParametersDestinationsItem` - Deleted or renamed model `NetworkTapPropertiesDestinationsItem` - Deleted or renamed model `NetworkTapRulePatchableProperties` - - Renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` to `OptionBLayer3ConfigurationPatchProperties` + - Deleted or renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` - Deleted or renamed model `NetworkToNetworkInterconnectsList` - - Deleted or renamed model `OptionAProperties` + - Renamed model `OptionAProperties` to `VpnOptionAProperties` - Renamed model `OptionBProperties` to `VpnOptionBProperties` - Deleted or renamed model `PollingIntervalInSeconds` - Deleted or renamed model `TerminalServerPatchableProperties` From cc5a8140cc3bb5b01ea3008b4e77d01ed2156a07 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 8 Jun 2026 13:01:08 +0800 Subject: [PATCH 6/6] Optimize changelog for azure-mgmt-managednetworkfabric Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../CHANGELOG.md | 311 +++--------------- 1 file changed, 48 insertions(+), 263 deletions(-) diff --git a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md index e5dc96b6da7b..b9d6f0fcf911 100644 --- a/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-mgmt-managednetworkfabric/CHANGELOG.md @@ -8,12 +8,10 @@ - Client `ManagedNetworkFabricMgmtClient` added operation group `network_monitors` - Client `ManagedNetworkFabricMgmtClient` added operation group `network_bootstrap_devices` - Client `ManagedNetworkFabricMgmtClient` added operation group `network_bootstrap_interfaces` - - Model `AccessControlList` added property `properties` - Model `AccessControlListAction` added property `remark_comment` - Model `AccessControlListAction` added property `police_rate_configuration` - Model `AccessControlListMatchCondition` added property `protocol_neighbors` - Model `AccessControlListMatchCondition` added property `icmp_configuration` - - Model `AccessControlListPatch` added property `properties` - Model `AccessControlListPatchProperties` added property `control_plane_acl_configuration` - Model `AccessControlListPatchProperties` added property `acl_type` - Model `AccessControlListPatchProperties` added property `device_role` @@ -38,7 +36,6 @@ - Enum `DeviceAdministrativeState` added member `UNGRACEFUL_QUARANTINE` - Enum `DeviceAdministrativeState` added member `UNGRACEFUL_RMA` - Enum `EnableDisableState` added member `UNDER_MAINTENANCE` - - Model `ExternalNetwork` added property `properties` - Model `ExternalNetworkPatchProperties` added property `static_route_configuration` - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `bmp_configuration` - Model `ExternalNetworkPatchPropertiesOptionAProperties` added property `v4_over_v6_bgp_session` @@ -53,31 +50,24 @@ - Model `ExternalNetworkPropertiesOptionAProperties` added property `v6_over_v4_bgp_session` - Model `ExternalNetworkPropertiesOptionAProperties` added property `native_ipv4_prefix_limit` - Model `ExternalNetworkPropertiesOptionAProperties` added property `native_ipv6_prefix_limit` - - Model `InternalNetwork` added property `properties` - Model `InternalNetworkPatchProperties` added property `native_ipv4_prefix_limit` - Model `InternalNetworkPatchProperties` added property `native_ipv6_prefix_limit` - Model `InternalNetworkProperties` added property `native_ipv4_prefix_limit` - Model `InternalNetworkProperties` added property `native_ipv6_prefix_limit` - Model `InternalNetworkProperties` added property `last_operation` - Model `InternalNetworkProperties` added property `network_fabric_id` - - Model `InternetGateway` added property `properties` - Model `InternetGatewayProperties` added property `internet_gateway_type` - Model `InternetGatewayProperties` added property `last_operation` - - Model `InternetGatewayRule` added property `properties` - Model `InternetGatewayRuleProperties` added property `last_operation` - - Model `IpCommunity` added property `properties` - Model `IpCommunityPatch` added property `properties` - Model `IpCommunityProperties` added property `network_fabric_id` - Model `IpCommunityProperties` added property `last_operation` - - Model `IpExtendedCommunity` added property `properties` - Model `IpExtendedCommunityPatch` added property `properties` - Model `IpExtendedCommunityProperties` added property `network_fabric_id` - Model `IpExtendedCommunityProperties` added property `last_operation` - - Model `IpPrefix` added property `properties` - Model `IpPrefixPatch` added property `properties` - Model `IpPrefixProperties` added property `network_fabric_id` - Model `IpPrefixProperties` added property `last_operation` - - Model `L2IsolationDomain` added property `properties` - Model `L2IsolationDomain` added property `identity` - Model `L2IsolationDomainPatch` added property `properties` - Model `L2IsolationDomainPatch` added property `identity` @@ -86,9 +76,7 @@ - Model `L2IsolationDomainProperties` added property `extended_vlan` - Model `L2IsolationDomainProperties` added property `network_to_network_interconnect_id` - Model `L2IsolationDomainProperties` added property `last_operation` - - Model `L3IsolationDomain` added property `properties` - Model `L3IsolationDomain` added property `identity` - - Model `L3IsolationDomainPatch` added property `properties` - Model `L3IsolationDomainPatch` added property `identity` - Model `L3IsolationDomainPatchProperties` added property `static_route_policy` - Model `L3IsolationDomainPatchProperties` added property `v4_route_prefix_limit` @@ -103,14 +91,12 @@ - Enum `Layer4Protocol` added member `SCTP` - Model `NeighborAddress` added property `bfd_administrative_state` - Model `NeighborAddress` added property `bgp_administrative_state` - - Model `NeighborGroup` added property `properties` - Model `NeighborGroup` added property `identity` - Model `NeighborGroupPatch` added property `properties` - Model `NeighborGroupPatch` added property `identity` - Model `NeighborGroupProperties` added property `network_fabric_ids` - Model `NeighborGroupProperties` added property `last_operation` - Model `NeighborGroupProperties` added property `configuration_state` - - Model `NetworkDevice` added property `properties` - Model `NetworkDevice` added property `identity` - Model `NetworkDevicePatchParameters` added property `properties` - Model `NetworkDevicePatchParameters` added property `identity` @@ -121,13 +107,10 @@ - Model `NetworkDeviceProperties` added property `secret_rotation_status` - Model `NetworkDeviceProperties` added property `certificate_rotation_status` - Model `NetworkDeviceProperties` added property `network_fabric_id` - - Model `NetworkFabric` added property `properties` - Model `NetworkFabric` added property `identity` - - Model `NetworkFabricController` added property `properties` - Model `NetworkFabricController` added property `identity` - Model `NetworkFabricControllerPatch` added property `identity` - Model `NetworkFabricControllerProperties` added property `last_operation` - - Model `NetworkFabricPatch` added property `properties` - Model `NetworkFabricPatch` added property `identity` - Model `NetworkFabricPatchProperties` added property `storage_account_configuration` - Model `NetworkFabricPatchProperties` added property `hardware_alert_threshold` @@ -150,7 +133,6 @@ - Model `NetworkFabricProperties` added property `last_operation` - Model `NetworkFabricProperties` added property `authorized_transceiver` - Model `NetworkFabricProperties` added property `qos_configuration` - - Model `NetworkInterface` added property `properties` - Model `NetworkInterface` added property `identity` - Model `NetworkInterfacePatchProperties` added property `additional_description` - Model `NetworkInterfaceProperties` added property `description` @@ -160,17 +142,13 @@ - Model `NetworkInterfaceProperties` added property `configuration_state` - Model `NetworkPacketBroker` added property `identity` - Model `NetworkPacketBrokerPatch` added property `identity` - - Model `NetworkRack` added property `properties` - Model `NetworkRackProperties` added property `last_operation` - Model `NetworkRackProperties` added property `configuration_state` - - Model `NetworkTap` added property `properties` - Model `NetworkTap` added property `identity` - Model `NetworkTapPatch` added property `identity` - Model `NetworkTapProperties` added property `network_fabric_ids` - Model `NetworkTapProperties` added property `last_operation` - - Model `NetworkTapRule` added property `properties` - Model `NetworkTapRule` added property `identity` - - Model `NetworkTapRulePatch` added property `properties` - Model `NetworkTapRulePatch` added property `identity` - Model `NetworkTapRulePatchProperties` added property `identity_selector` - Model `NetworkTapRulePatchProperties` added property `global_network_tap_rule_actions` @@ -183,7 +161,6 @@ - Model `OptionBLayer3Configuration` added property `bmp_configuration` - Model `OptionBLayer3Configuration` added property `prefix_limits` - Enum `PortType` added member `BIDIRECTIONAL` - - Model `RoutePolicy` added property `properties` - Model `RoutePolicyPatch` added property `properties` - Model `RoutePolicyProperties` added property `last_operation` - Model `RuleProperties` added property `condition` @@ -417,58 +394,36 @@ - Added model `VlanMatchConditionPatch` - Added model `VpnOptionAPatchProperties` - Added model `VpnOptionBPatchProperties` - - Model `ExternalNetworksOperations` added method `begin_update_bfd_administrative_state` - - Model `InternalNetworksOperations` added method `begin_update_bfd_administrative_state` - - Model `NeighborGroupsOperations` added method `begin_resync` - - Model `NetworkDevicesOperations` added method `begin_resync_certificates` - - Model `NetworkDevicesOperations` added method `begin_resync_passwords` - - Model `NetworkDevicesOperations` added method `begin_run_ro_command` - - Model `NetworkDevicesOperations` added method `begin_run_rw_command` - - Model `NetworkFabricsOperations` added method `begin_arm_configuration_diff` - - Model `NetworkFabricsOperations` added method `begin_commit_batch_status` - - Model `NetworkFabricsOperations` added method `begin_discard_commit_batch` - - Model `NetworkFabricsOperations` added method `begin_lock_fabric` - - Model `NetworkFabricsOperations` added method `begin_resync_certificates` - - Model `NetworkFabricsOperations` added method `begin_resync_passwords` - - Model `NetworkFabricsOperations` added method `begin_rotate_certificates` - - Model `NetworkFabricsOperations` added method `begin_rotate_passwords` - - Model `NetworkFabricsOperations` added method `begin_view_device_configuration` - - Model `NetworkToNetworkInterconnectsOperations` added method `begin_update_bfd_administrative_state` - - Added model `NetworkBootstrapDevicesOperations` - - Added model `NetworkBootstrapInterfacesOperations` - - Added model `NetworkMonitorsOperations` + - Operation group `ExternalNetworksOperations` added method `begin_update_bfd_administrative_state` + - Operation group `InternalNetworksOperations` added method `begin_update_bfd_administrative_state` + - Operation group `NeighborGroupsOperations` added method `begin_resync` + - Operation group `NetworkDevicesOperations` added method `begin_resync_certificates` + - Operation group `NetworkDevicesOperations` added method `begin_resync_passwords` + - Operation group `NetworkDevicesOperations` added method `begin_run_ro_command` + - Operation group `NetworkDevicesOperations` added method `begin_run_rw_command` + - Operation group `NetworkFabricsOperations` added method `begin_arm_configuration_diff` + - Operation group `NetworkFabricsOperations` added method `begin_commit_batch_status` + - Operation group `NetworkFabricsOperations` added method `begin_discard_commit_batch` + - Operation group `NetworkFabricsOperations` added method `begin_lock_fabric` + - Operation group `NetworkFabricsOperations` added method `begin_resync_certificates` + - Operation group `NetworkFabricsOperations` added method `begin_resync_passwords` + - Operation group `NetworkFabricsOperations` added method `begin_rotate_certificates` + - Operation group `NetworkFabricsOperations` added method `begin_rotate_passwords` + - Operation group `NetworkFabricsOperations` added method `begin_view_device_configuration` + - Operation group `NetworkToNetworkInterconnectsOperations` added method `begin_update_bfd_administrative_state` + - Added operation group `NetworkBootstrapDevicesOperations` + - Added operation group `NetworkBootstrapInterfacesOperations` + - Added operation group `NetworkMonitorsOperations` ### Breaking Changes - - Model `AccessControlList` deleted or renamed its instance variable `annotation` - - Model `AccessControlList` deleted or renamed its instance variable `configuration_type` - - Model `AccessControlList` deleted or renamed its instance variable `acls_url` - - Model `AccessControlList` deleted or renamed its instance variable `default_action` - - Model `AccessControlList` deleted or renamed its instance variable `match_configurations` - - Model `AccessControlList` deleted or renamed its instance variable `dynamic_match_configurations` - - Model `AccessControlList` deleted or renamed its instance variable `last_synced_time` - - Model `AccessControlList` deleted or renamed its instance variable `configuration_state` - - Model `AccessControlList` deleted or renamed its instance variable `provisioning_state` - - Model `AccessControlList` deleted or renamed its instance variable `administrative_state` - - Model `AccessControlListPatch` deleted or renamed its instance variable `configuration_type` - - Model `AccessControlListPatch` deleted or renamed its instance variable `acls_url` - - Model `AccessControlListPatch` deleted or renamed its instance variable `default_action` - - Model `AccessControlListPatch` deleted or renamed its instance variable `match_configurations` - - Model `AccessControlListPatch` deleted or renamed its instance variable `dynamic_match_configurations` - - Model `AccessControlListPatch` deleted or renamed its instance variable `annotation` + - This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration. + - Model `AccessControlList` moved instance variable `annotation`, `configuration_type`, `acls_url`, `default_action`, `match_configurations`, `dynamic_match_configurations`, `last_synced_time`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `AccessControlListProperties` + - Model `AccessControlListPatch` moved instance variable `configuration_type`, `acls_url`, `default_action`, `match_configurations`, `dynamic_match_configurations` and `annotation` under property `properties` whose type is `AccessControlListPatchProperties` - Model `ConnectedSubnetRoutePolicy` deleted or renamed its instance variable `export_route_policy_id` - - Model `ExternalNetwork` deleted or renamed its instance variable `annotation` - - Model `ExternalNetwork` deleted or renamed its instance variable `network_to_network_interconnect_id` + - Model `ExternalNetwork` moved instance variable `annotation`, `network_to_network_interconnect_id`, `import_route_policy`, `export_route_policy`, `peering_option`, `option_b_properties`, `option_a_properties`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `ExternalNetworkProperties` - Model `ExternalNetwork` deleted or renamed its instance variable `import_route_policy_id` - Model `ExternalNetwork` deleted or renamed its instance variable `export_route_policy_id` - - Model `ExternalNetwork` deleted or renamed its instance variable `import_route_policy` - - Model `ExternalNetwork` deleted or renamed its instance variable `export_route_policy` - - Model `ExternalNetwork` deleted or renamed its instance variable `peering_option` - - Model `ExternalNetwork` deleted or renamed its instance variable `option_b_properties` - - Model `ExternalNetwork` deleted or renamed its instance variable `option_a_properties` - - Model `ExternalNetwork` deleted or renamed its instance variable `configuration_state` - - Model `ExternalNetwork` deleted or renamed its instance variable `provisioning_state` - - Model `ExternalNetwork` deleted or renamed its instance variable `administrative_state` - Model `ExternalNetworkPatch` deleted or renamed its instance variable `annotation` - Model `ExternalNetworkPatch` deleted or renamed its instance variable `network_to_network_interconnect_id` - Model `ExternalNetworkPatch` deleted or renamed its instance variable `import_route_policy_id` @@ -482,24 +437,9 @@ - Model `ExternalNetworkPatchProperties` deleted or renamed its instance variable `export_route_policy_id` - Model `ExternalNetworkProperties` deleted or renamed its instance variable `import_route_policy_id` - Model `ExternalNetworkProperties` deleted or renamed its instance variable `export_route_policy_id` - - Model `InternalNetwork` deleted or renamed its instance variable `annotation` - - Model `InternalNetwork` deleted or renamed its instance variable `mtu` - - Model `InternalNetwork` deleted or renamed its instance variable `connected_i_pv4_subnets` - - Model `InternalNetwork` deleted or renamed its instance variable `connected_i_pv6_subnets` + - Model `InternalNetwork` moved instance variable `annotation`, `mtu`, `connected_i_pv4_subnets`, `connected_i_pv6_subnets`, `import_route_policy`, `export_route_policy`, `ingress_acl_id`, `egress_acl_id`, `is_monitoring_enabled`, `extension`, `vlan_id`, `bgp_configuration`, `static_route_configuration`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `InternalNetworkProperties` - Model `InternalNetwork` deleted or renamed its instance variable `import_route_policy_id` - Model `InternalNetwork` deleted or renamed its instance variable `export_route_policy_id` - - Model `InternalNetwork` deleted or renamed its instance variable `import_route_policy` - - Model `InternalNetwork` deleted or renamed its instance variable `export_route_policy` - - Model `InternalNetwork` deleted or renamed its instance variable `ingress_acl_id` - - Model `InternalNetwork` deleted or renamed its instance variable `egress_acl_id` - - Model `InternalNetwork` deleted or renamed its instance variable `is_monitoring_enabled` - - Model `InternalNetwork` deleted or renamed its instance variable `extension` - - Model `InternalNetwork` deleted or renamed its instance variable `vlan_id` - - Model `InternalNetwork` deleted or renamed its instance variable `bgp_configuration` - - Model `InternalNetwork` deleted or renamed its instance variable `static_route_configuration` - - Model `InternalNetwork` deleted or renamed its instance variable `configuration_state` - - Model `InternalNetwork` deleted or renamed its instance variable `provisioning_state` - - Model `InternalNetwork` deleted or renamed its instance variable `administrative_state` - Model `InternalNetworkPatch` deleted or renamed its instance variable `annotation` - Model `InternalNetworkPatch` deleted or renamed its instance variable `mtu` - Model `InternalNetworkPatch` deleted or renamed its instance variable `connected_i_pv4_subnets` @@ -517,180 +457,50 @@ - Model `InternalNetworkPatchProperties` deleted or renamed its instance variable `export_route_policy_id` - Model `InternalNetworkProperties` deleted or renamed its instance variable `import_route_policy_id` - Model `InternalNetworkProperties` deleted or renamed its instance variable `export_route_policy_id` - - Model `InternetGateway` deleted or renamed its instance variable `annotation` - - Model `InternetGateway` deleted or renamed its instance variable `internet_gateway_rule_id` - - Model `InternetGateway` deleted or renamed its instance variable `ipv4_address` - - Model `InternetGateway` deleted or renamed its instance variable `port` + - Model `InternetGateway` moved instance variable `annotation`, `internet_gateway_rule_id`, `ipv4_address`, `port`, `network_fabric_controller_id` and `provisioning_state` under property `properties` whose type is `InternetGatewayProperties` - Model `InternetGateway` deleted or renamed its instance variable `type_properties_type` - - Model `InternetGateway` deleted or renamed its instance variable `network_fabric_controller_id` - - Model `InternetGateway` deleted or renamed its instance variable `provisioning_state` - - Model `InternetGatewayRule` deleted or renamed its instance variable `annotation` - - Model `InternetGatewayRule` deleted or renamed its instance variable `rule_properties` - - Model `InternetGatewayRule` deleted or renamed its instance variable `provisioning_state` - - Model `InternetGatewayRule` deleted or renamed its instance variable `internet_gateway_ids` - - Model `IpCommunity` deleted or renamed its instance variable `annotation` - - Model `IpCommunity` deleted or renamed its instance variable `ip_community_rules` - - Model `IpCommunity` deleted or renamed its instance variable `configuration_state` - - Model `IpCommunity` deleted or renamed its instance variable `provisioning_state` - - Model `IpCommunity` deleted or renamed its instance variable `administrative_state` + - Model `InternetGatewayRule` moved instance variable `annotation`, `rule_properties`, `provisioning_state` and `internet_gateway_ids` under property `properties` whose type is `InternetGatewayRuleProperties` + - Model `IpCommunity` moved instance variable `annotation`, `ip_community_rules`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `IpCommunityProperties` - Model `IpCommunityPatch` deleted or renamed its instance variable `ip_community_rules` - - Model `IpExtendedCommunity` deleted or renamed its instance variable `annotation` - - Model `IpExtendedCommunity` deleted or renamed its instance variable `ip_extended_community_rules` - - Model `IpExtendedCommunity` deleted or renamed its instance variable `configuration_state` - - Model `IpExtendedCommunity` deleted or renamed its instance variable `provisioning_state` - - Model `IpExtendedCommunity` deleted or renamed its instance variable `administrative_state` + - Model `IpExtendedCommunity` moved instance variable `annotation`, `ip_extended_community_rules`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `IpExtendedCommunityProperties` - Model `IpExtendedCommunityPatch` deleted or renamed its instance variable `ip_extended_community_rules` - Model `IpExtendedCommunityPatch` deleted or renamed its instance variable `annotation` - - Model `IpPrefix` deleted or renamed its instance variable `annotation` - - Model `IpPrefix` deleted or renamed its instance variable `ip_prefix_rules` - - Model `IpPrefix` deleted or renamed its instance variable `configuration_state` - - Model `IpPrefix` deleted or renamed its instance variable `provisioning_state` - - Model `IpPrefix` deleted or renamed its instance variable `administrative_state` + - Model `IpPrefix` moved instance variable `annotation`, `ip_prefix_rules`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `IpPrefixProperties` - Model `IpPrefixPatch` deleted or renamed its instance variable `annotation` - Model `IpPrefixPatch` deleted or renamed its instance variable `ip_prefix_rules` - - Model `L2IsolationDomain` deleted or renamed its instance variable `annotation` - - Model `L2IsolationDomain` deleted or renamed its instance variable `network_fabric_id` - - Model `L2IsolationDomain` deleted or renamed its instance variable `vlan_id` - - Model `L2IsolationDomain` deleted or renamed its instance variable `mtu` - - Model `L2IsolationDomain` deleted or renamed its instance variable `configuration_state` - - Model `L2IsolationDomain` deleted or renamed its instance variable `provisioning_state` - - Model `L2IsolationDomain` deleted or renamed its instance variable `administrative_state` + - Model `L2IsolationDomain` moved instance variable `annotation`, `network_fabric_id`, `vlan_id`, `mtu`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `L2IsolationDomainProperties` - Model `L2IsolationDomainPatch` deleted or renamed its instance variable `annotation` - Model `L2IsolationDomainPatch` deleted or renamed its instance variable `mtu` - - Model `L3IsolationDomain` deleted or renamed its instance variable `annotation` - - Model `L3IsolationDomain` deleted or renamed its instance variable `redistribute_connected_subnets` - - Model `L3IsolationDomain` deleted or renamed its instance variable `redistribute_static_routes` - - Model `L3IsolationDomain` deleted or renamed its instance variable `aggregate_route_configuration` - - Model `L3IsolationDomain` deleted or renamed its instance variable `connected_subnet_route_policy` - - Model `L3IsolationDomain` deleted or renamed its instance variable `network_fabric_id` - - Model `L3IsolationDomain` deleted or renamed its instance variable `configuration_state` - - Model `L3IsolationDomain` deleted or renamed its instance variable `provisioning_state` - - Model `L3IsolationDomain` deleted or renamed its instance variable `administrative_state` - - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `annotation` - - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `redistribute_connected_subnets` - - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `redistribute_static_routes` - - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `aggregate_route_configuration` - - Model `L3IsolationDomainPatch` deleted or renamed its instance variable `connected_subnet_route_policy` - - Model `NeighborGroup` deleted or renamed its instance variable `annotation` - - Model `NeighborGroup` deleted or renamed its instance variable `destination` - - Model `NeighborGroup` deleted or renamed its instance variable `network_tap_ids` - - Model `NeighborGroup` deleted or renamed its instance variable `network_tap_rule_ids` - - Model `NeighborGroup` deleted or renamed its instance variable `provisioning_state` + - Model `L3IsolationDomain` moved instance variable `annotation`, `redistribute_connected_subnets`, `redistribute_static_routes`, `aggregate_route_configuration`, `connected_subnet_route_policy`, `network_fabric_id`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `L3IsolationDomainProperties` + - Model `L3IsolationDomainPatch` moved instance variable `annotation`, `redistribute_connected_subnets`, `redistribute_static_routes`, `aggregate_route_configuration` and `connected_subnet_route_policy` under property `properties` whose type is `L3IsolationDomainPatchProperties` + - Model `NeighborGroup` moved instance variable `annotation`, `destination`, `network_tap_ids`, `network_tap_rule_ids` and `provisioning_state` under property `properties` whose type is `NeighborGroupProperties` - Model `NeighborGroupPatch` deleted or renamed its instance variable `annotation` - Model `NeighborGroupPatch` deleted or renamed its instance variable `destination` - - Model `NetworkDevice` deleted or renamed its instance variable `annotation` - - Model `NetworkDevice` deleted or renamed its instance variable `host_name` - - Model `NetworkDevice` deleted or renamed its instance variable `serial_number` - - Model `NetworkDevice` deleted or renamed its instance variable `version` - - Model `NetworkDevice` deleted or renamed its instance variable `network_device_sku` - - Model `NetworkDevice` deleted or renamed its instance variable `network_device_role` - - Model `NetworkDevice` deleted or renamed its instance variable `network_rack_id` - - Model `NetworkDevice` deleted or renamed its instance variable `management_ipv4_address` - - Model `NetworkDevice` deleted or renamed its instance variable `management_ipv6_address` - - Model `NetworkDevice` deleted or renamed its instance variable `configuration_state` - - Model `NetworkDevice` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkDevice` deleted or renamed its instance variable `administrative_state` + - Model `NetworkDevice` moved instance variable `annotation`, `host_name`, `serial_number`, `version`, `network_device_sku`, `network_device_role`, `network_rack_id`, `management_ipv4_address`, `management_ipv6_address`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `NetworkDeviceProperties` - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `annotation` - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `host_name` - Model `NetworkDevicePatchParameters` deleted or renamed its instance variable `serial_number` - - Model `NetworkFabric` deleted or renamed its instance variable `annotation` - - Model `NetworkFabric` deleted or renamed its instance variable `network_fabric_sku` - - Model `NetworkFabric` deleted or renamed its instance variable `fabric_version` - - Model `NetworkFabric` deleted or renamed its instance variable `router_ids` - - Model `NetworkFabric` deleted or renamed its instance variable `network_fabric_controller_id` - - Model `NetworkFabric` deleted or renamed its instance variable `rack_count` - - Model `NetworkFabric` deleted or renamed its instance variable `server_count_per_rack` - - Model `NetworkFabric` deleted or renamed its instance variable `ipv4_prefix` - - Model `NetworkFabric` deleted or renamed its instance variable `ipv6_prefix` - - Model `NetworkFabric` deleted or renamed its instance variable `fabric_asn` - - Model `NetworkFabric` deleted or renamed its instance variable `terminal_server_configuration` - - Model `NetworkFabric` deleted or renamed its instance variable `management_network_configuration` - - Model `NetworkFabric` deleted or renamed its instance variable `racks` - - Model `NetworkFabric` deleted or renamed its instance variable `l2_isolation_domains` - - Model `NetworkFabric` deleted or renamed its instance variable `l3_isolation_domains` - - Model `NetworkFabric` deleted or renamed its instance variable `configuration_state` - - Model `NetworkFabric` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkFabric` deleted or renamed its instance variable `administrative_state` - - Model `NetworkFabricController` deleted or renamed its instance variable `annotation` - - Model `NetworkFabricController` deleted or renamed its instance variable `infrastructure_express_route_connections` - - Model `NetworkFabricController` deleted or renamed its instance variable `workload_express_route_connections` - - Model `NetworkFabricController` deleted or renamed its instance variable `infrastructure_services` - - Model `NetworkFabricController` deleted or renamed its instance variable `workload_services` - - Model `NetworkFabricController` deleted or renamed its instance variable `managed_resource_group_configuration` - - Model `NetworkFabricController` deleted or renamed its instance variable `network_fabric_ids` + - Model `NetworkFabric` moved instance variable `annotation`, `network_fabric_sku`, `fabric_version`, `router_ids`, `network_fabric_controller_id`, `rack_count`, `server_count_per_rack`, `ipv4_prefix`, `ipv6_prefix`, `fabric_asn`, `terminal_server_configuration`, `management_network_configuration`, `racks`, `l2_isolation_domains`, `l3_isolation_domains`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `NetworkFabricProperties` + - Model `NetworkFabricController` moved instance variable `annotation`, `infrastructure_express_route_connections`, `workload_express_route_connections`, `infrastructure_services`, `workload_services`, `managed_resource_group_configuration`, `network_fabric_ids`, `is_workload_management_network_enabled`, `tenant_internet_gateway_ids`, `ipv4_address_space`, `ipv6_address_space`, `nfc_sku` and `provisioning_state` under property `properties` whose type is `NetworkFabricControllerProperties` - Model `NetworkFabricController` deleted or renamed its instance variable `workload_management_network` - - Model `NetworkFabricController` deleted or renamed its instance variable `is_workload_management_network_enabled` - - Model `NetworkFabricController` deleted or renamed its instance variable `tenant_internet_gateway_ids` - - Model `NetworkFabricController` deleted or renamed its instance variable `ipv4_address_space` - - Model `NetworkFabricController` deleted or renamed its instance variable `ipv6_address_space` - - Model `NetworkFabricController` deleted or renamed its instance variable `nfc_sku` - - Model `NetworkFabricController` deleted or renamed its instance variable `provisioning_state` - Model `NetworkFabricControllerProperties` deleted or renamed its instance variable `workload_management_network` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `annotation` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `rack_count` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `server_count_per_rack` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `ipv4_prefix` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `ipv6_prefix` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `fabric_asn` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `terminal_server_configuration` - - Model `NetworkFabricPatch` deleted or renamed its instance variable `management_network_configuration` - - Model `NetworkInterface` deleted or renamed its instance variable `annotation` - - Model `NetworkInterface` deleted or renamed its instance variable `physical_identifier` - - Model `NetworkInterface` deleted or renamed its instance variable `connected_to` - - Model `NetworkInterface` deleted or renamed its instance variable `interface_type` - - Model `NetworkInterface` deleted or renamed its instance variable `ipv4_address` - - Model `NetworkInterface` deleted or renamed its instance variable `ipv6_address` - - Model `NetworkInterface` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkInterface` deleted or renamed its instance variable `administrative_state` + - Model `NetworkFabricPatch` moved instance variable `annotation`, `rack_count`, `server_count_per_rack`, `ipv4_prefix`, `ipv6_prefix`, `fabric_asn`, `terminal_server_configuration` and `management_network_configuration` under property `properties` whose type is `NetworkFabricPatchProperties` + - Model `NetworkInterface` moved instance variable `annotation`, `physical_identifier`, `connected_to`, `interface_type`, `ipv4_address`, `ipv6_address`, `provisioning_state` and `administrative_state` under property `properties` whose type is `NetworkInterfaceProperties` - Model `NetworkInterfacePatch` deleted or renamed its instance variable `annotation` - - Model `NetworkRack` deleted or renamed its instance variable `annotation` - - Model `NetworkRack` deleted or renamed its instance variable `network_rack_type` - - Model `NetworkRack` deleted or renamed its instance variable `network_fabric_id` - - Model `NetworkRack` deleted or renamed its instance variable `network_devices` - - Model `NetworkRack` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkTap` deleted or renamed its instance variable `annotation` - - Model `NetworkTap` deleted or renamed its instance variable `network_packet_broker_id` - - Model `NetworkTap` deleted or renamed its instance variable `source_tap_rule_id` - - Model `NetworkTap` deleted or renamed its instance variable `destinations` - - Model `NetworkTap` deleted or renamed its instance variable `polling_type` - - Model `NetworkTap` deleted or renamed its instance variable `configuration_state` - - Model `NetworkTap` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkTap` deleted or renamed its instance variable `administrative_state` - - Model `NetworkTapRule` deleted or renamed its instance variable `annotation` - - Model `NetworkTapRule` deleted or renamed its instance variable `configuration_type` - - Model `NetworkTapRule` deleted or renamed its instance variable `tap_rules_url` - - Model `NetworkTapRule` deleted or renamed its instance variable `match_configurations` - - Model `NetworkTapRule` deleted or renamed its instance variable `dynamic_match_configurations` - - Model `NetworkTapRule` deleted or renamed its instance variable `network_tap_id` - - Model `NetworkTapRule` deleted or renamed its instance variable `polling_interval_in_seconds` - - Model `NetworkTapRule` deleted or renamed its instance variable `last_synced_time` - - Model `NetworkTapRule` deleted or renamed its instance variable `configuration_state` - - Model `NetworkTapRule` deleted or renamed its instance variable `provisioning_state` - - Model `NetworkTapRule` deleted or renamed its instance variable `administrative_state` - - Model `NetworkTapRulePatch` deleted or renamed its instance variable `annotation` - - Model `NetworkTapRulePatch` deleted or renamed its instance variable `configuration_type` - - Model `NetworkTapRulePatch` deleted or renamed its instance variable `tap_rules_url` - - Model `NetworkTapRulePatch` deleted or renamed its instance variable `match_configurations` - - Model `NetworkTapRulePatch` deleted or renamed its instance variable `dynamic_match_configurations` - - Model `RoutePolicy` deleted or renamed its instance variable `annotation` - - Model `RoutePolicy` deleted or renamed its instance variable `default_action` - - Model `RoutePolicy` deleted or renamed its instance variable `statements` - - Model `RoutePolicy` deleted or renamed its instance variable `network_fabric_id` - - Model `RoutePolicy` deleted or renamed its instance variable `address_family_type` - - Model `RoutePolicy` deleted or renamed its instance variable `configuration_state` - - Model `RoutePolicy` deleted or renamed its instance variable `provisioning_state` - - Model `RoutePolicy` deleted or renamed its instance variable `administrative_state` + - Model `NetworkRack` moved instance variable `annotation`, `network_rack_type`, `network_fabric_id`, `network_devices` and `provisioning_state` under property `properties` whose type is `NetworkRackProperties` + - Model `NetworkTap` moved instance variable `annotation`, `network_packet_broker_id`, `source_tap_rule_id`, `destinations`, `polling_type`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `NetworkTapProperties` + - Model `NetworkTapRule` moved instance variable `annotation`, `configuration_type`, `tap_rules_url`, `match_configurations`, `dynamic_match_configurations`, `network_tap_id`, `polling_interval_in_seconds`, `last_synced_time`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `NetworkTapRuleProperties` + - Model `NetworkTapRulePatch` moved instance variable `annotation`, `configuration_type`, `tap_rules_url`, `match_configurations` and `dynamic_match_configurations` under property `properties` whose type is `NetworkTapRulePatchProperties` + - Model `RoutePolicy` moved instance variable `annotation`, `default_action`, `statements`, `network_fabric_id`, `address_family_type`, `configuration_state`, `provisioning_state` and `administrative_state` under property `properties` whose type is `RoutePolicyProperties` - Model `RoutePolicyPatch` deleted or renamed its instance variable `default_action` - Model `RoutePolicyPatch` deleted or renamed its instance variable `statements` - Deleted or renamed model `AccessControlListPatchableProperties` - Deleted or renamed model `ExtendedLocation` - Deleted or renamed model `ExtensionEnumProperty` - Deleted or renamed model `ExternalNetworkPatchableProperties` - - Deleted or renamed model `ExternalNetworksList` - Deleted or renamed model `InternalNetworkPatchableProperties` - Deleted or renamed model `InternalNetworkPropertiesBgpConfiguration` - Deleted or renamed model `InternalNetworkPropertiesStaticRouteConfiguration` - - Deleted or renamed model `InternalNetworksList` - Deleted or renamed model `InternetGatewayPatchableProperties` - Deleted or renamed model `IpCommunityAddOperationProperties` - Deleted or renamed model `IpCommunityDeleteOperationProperties` @@ -708,46 +518,17 @@ - Deleted or renamed model `NetworkFabricControllerPatchableProperties` - Deleted or renamed model `NetworkFabricPatchableProperties` - Renamed model `NetworkFabricPatchablePropertiesTerminalServerConfiguration` to `TerminalServerPatchConfiguration` - - Deleted or renamed model `NetworkInterfacesList` - Deleted or renamed model `NetworkTapPatchableParameters` - Deleted or renamed model `NetworkTapPatchableParametersDestinationsItem` - Deleted or renamed model `NetworkTapPropertiesDestinationsItem` - Deleted or renamed model `NetworkTapRulePatchableProperties` - Deleted or renamed model `NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration` - - Deleted or renamed model `NetworkToNetworkInterconnectsList` - Renamed model `OptionAProperties` to `VpnOptionAProperties` - Renamed model `OptionBProperties` to `VpnOptionBProperties` - Deleted or renamed model `PollingIntervalInSeconds` - Deleted or renamed model `TerminalServerPatchableProperties` - Deleted or renamed model `VpnConfigurationPatchablePropertiesOptionAProperties` - Deleted or renamed model `VpnConfigurationPropertiesOptionAProperties` - - Method `AccessControlListsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `ExternalNetworksOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `InternalNetworksOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `InternalNetworksOperations.begin_update_bgp_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[InternalNetworkUpdateBgpAdministrativeStateResponse]` - - Method `InternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `L2IsolationDomainsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `L3IsolationDomainsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkDevicesOperations.begin_reboot` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` - - Method `NetworkDevicesOperations.begin_refresh_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceRefreshConfigurationResponse]` - - Method `NetworkDevicesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceUpdateAdministrativeStateResponse]` - - Method `NetworkDevicesOperations.begin_upgrade` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkDeviceUpgradeResponse]` - - Method `NetworkFabricsOperations.begin_commit_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[CommitConfigurationResponse]` - - Method `NetworkFabricsOperations.begin_deprovision` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[OperationStatusResult]` - - Method `NetworkFabricsOperations.begin_get_topology` changed return type from `AsyncLROPoller[ValidateConfigurationResponse]` to `AsyncLROPoller[GetTopologyResponse]` - - Method `NetworkFabricsOperations.begin_provision` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[OperationStatusResult]` - - Method `NetworkFabricsOperations.begin_refresh_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` - - Method `NetworkFabricsOperations.begin_update_infra_management_bfd_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkFabricsOperations.begin_update_workload_management_bfd_configuration` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkFabricsOperations.begin_upgrade` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[OperationStatusResult]` - - Method `NetworkInterfacesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkTapRulesOperations.begin_resync` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkTapRuleResyncResponse]` - - Method `NetworkTapsOperations.begin_resync` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[NetworkTapResyncResponse]` - - Method `NetworkTapsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkToNetworkInterconnectsOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForStateUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - - Method `RoutePoliciesOperations.begin_update_administrative_state` changed return type from `AsyncLROPoller[CommonPostActionResponseForDeviceUpdate]` to `AsyncLROPoller[UpdateAdministrativeStateResponse]` - Method `AccessControlListsOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` - Method `ExternalNetworksOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` - Method `ExternalNetworksOperations.begin_update_static_route_bfd_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` @@ -776,6 +557,10 @@ - Method `NetworkToNetworkInterconnectsOperations.begin_update_npb_static_route_bfd_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForStateUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` - Method `RoutePoliciesOperations.begin_update_administrative_state` changed return type from `LROPoller[CommonPostActionResponseForDeviceUpdate]` to `LROPoller[UpdateAdministrativeStateResponse]` +### Other Changes + + - Deleted model `ExternalNetworksList`/`InternalNetworksList`/`NetworkInterfacesList`/`NetworkToNetworkInterconnectsList` which actually were not used by SDK users + ## 1.0.0 (2023-07-19) ### Features Added